mruby · GitHub

Original file line numberDiff line numberDiff line change

@@ -16,14 +16,15 @@ def assert_io_open(meth)

1616

io1.close

1717

end

1818
19-

io2 = IO.__send__(meth, IO.sysopen($mrbtest_io_rfname))do |io|

20-

if meth == :open

21-

assert_equal $mrbtest_io_msg, io.read

22-

else

23-

flunk "IO.#{meth} does not take block"

19+

if meth == :open

20+

io2 = IO.__send__(meth, IO.sysopen($mrbtest_io_rfname))do |io|

21+

if meth == :open

22+

assert_equal $mrbtest_io_msg, io.read

23+

else

24+

flunk "IO.#{meth} does not take block"

25+

end

2426

end

2527

end

26-

io2.close unless meth == :open

2728
2829

assert_raise(RuntimeError) { IO.__send__(meth, 1023) } # For Windows

2930

assert_raise(RuntimeError) { IO.__send__(meth, 1 << 26) }

Read the original on github.com ↗