diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-08-31 14:58:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-09-25 09:50:33 +0900 |
commit | 996af2ce086249e904b2ce95ab2fcd1de7d757be (patch) | |
tree | 1b70f747a0eefc32be13f05bdb037275d1e664a1 /test/ruby/test_io.rb | |
parent | 83ff0f74bf69650754cac020bcd4ff9adbba877e (diff) |
Disable deprecation warning by the default [Feature #16345]
And `-w` option turns it on.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3481
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index fafb082154..7b1ddce78b 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -418,19 +418,6 @@ class TestIO < Test::Unit::TestCase } end - def test_codepoints - make_tempfile {|t| - bug2959 = '[ruby-core:28650]' - a = "" - File.open(t, 'rt') {|f| - assert_warn(/deprecated/) { - f.codepoints {|c| a << c} - } - } - assert_equal("foo\nbar\nbaz\n", a, bug2959) - } - end - def test_rubydev33072 t = make_tempfile path = t.path @@ -1835,70 +1822,6 @@ class TestIO < Test::Unit::TestCase end) end - def test_lines - verbose, $VERBOSE = $VERBOSE, nil - pipe(proc do |w| - w.puts "foo" - w.puts "bar" - w.puts "baz" - w.close - end, proc do |r| - e = nil - assert_warn(/deprecated/) { - e = r.lines - } - assert_equal("foo\n", e.next) - assert_equal("bar\n", e.next) - assert_equal("baz\n", e.next) - assert_raise(StopIteration) { e.next } - end) - ensure - $VERBOSE = verbose - end - - def test_bytes - verbose, $VERBOSE = $VERBOSE, nil - pipe(proc do |w| - w.binmode - w.puts "foo" - w.puts "bar" - w.puts "baz" - w.close - end, proc do |r| - e = nil - assert_warn(/deprecated/) { - e = r.bytes - } - (%w(f o o) + ["\n"] + %w(b a r) + ["\n"] + %w(b a z) + ["\n"]).each do |c| - assert_equal(c.ord, e.next) - end - assert_raise(StopIteration) { e.next } - end) - ensure - $VERBOSE = verbose - end - - def test_chars - verbose, $VERBOSE = $VERBOSE, nil - pipe(proc do |w| - w.puts "foo" - w.puts "bar" - w.puts "baz" - w.close - end, proc do |r| - e = nil - assert_warn(/deprecated/) { - e = r.chars - } - (%w(f o o) + ["\n"] + %w(b a r) + ["\n"] + %w(b a z) + ["\n"]).each do |c| - assert_equal(c, e.next) - end - assert_raise(StopIteration) { e.next } - end) - ensure - $VERBOSE = verbose - end - def test_readbyte pipe(proc do |w| w.binmode |