diff options
| author | Tomoyuki Sahara <[email protected]> | 2014-04-21 10:24:59 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2014-04-21 10:24:59 +0900 |
| commit | 9c00de59ceb3cf7e1a285745fa3f3c93f16cd9ec (patch) | |
| tree | bfea51e6830175c592bbd32366befa8705e92f34 /test | |
| parent | c46cb1b5eb1f92a23500bf877c10cd65e7c43e45 (diff) | |
| download | mruby-9c00de59ceb3cf7e1a285745fa3f3c93f16cd9ec.tar.gz mruby-9c00de59ceb3cf7e1a285745fa3f3c93f16cd9ec.zip | |
IO.for_fd can be written in Ruby.
Diffstat (limited to 'test')
| -rw-r--r-- | test/io.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/io.rb b/test/io.rb index 0ec0ef725..b5b952425 100644 --- a/test/io.rb +++ b/test/io.rb @@ -129,8 +129,18 @@ assert('IO#write', '15.2.20.5.20') do true end +assert('IO.for_fd') do + fd = IO.sysopen($mrbtest_io_rfname) + io = IO.for_fd(fd) + assert_equal $mrbtest_io_msg, io.read + io.close + true +end + assert('IO.new') do - IO.new(0) + io = IO.new(0) + io.close + true end assert('IO gc check') do |
