aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 126100e096..08f39c3a4a 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2282,7 +2282,12 @@ End
end
def test_new_with_block
- assert_in_out_err([], "r, w = IO.pipe; IO.new(r) {}", [], /^.+$/)
+ assert_in_out_err([], "r, w = IO.pipe; IO.new(r.fileno) {}", [], /^.+$/)
+ n = "IO\u{5165 51fa 529b}"
+ c = eval("class #{n} < IO; self; end")
+ IO.pipe do |r, w|
+ assert_warning(/#{n}/) {c.new(r.fileno) {}}
+ end
end
def test_readline2