diff options
| author | Tomoyuki Sahara <[email protected]> | 2016-09-30 17:10:55 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2016-09-30 17:10:55 +0900 |
| commit | f6a82772e6f857856edb37fcb43a892b6022780f (patch) | |
| tree | 9f23096da2f02c8b3c0538a35ca4951da2de7412 /test | |
| parent | 2229a2aa0fcd76bd5498417aca934d6ec7a211ef (diff) | |
| download | mruby-f6a82772e6f857856edb37fcb43a892b6022780f.tar.gz mruby-f6a82772e6f857856edb37fcb43a892b6022780f.zip | |
eof? should raise an IOError if it is not opened for reading.
Diffstat (limited to 'test')
| -rw-r--r-- | test/io.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/io.rb b/test/io.rb index c3f78da7e..e1ea4640e 100644 --- a/test/io.rb +++ b/test/io.rb @@ -70,12 +70,11 @@ end #assert('IO#each_line', '15.2.20.5.5') do assert('IO#eof?', '15.2.20.5.6') do - if false # XXX: not implemented yet - io = IO.new(IO.sysopen($mrbtest_io_wfname, 'w'), 'w') - assert_raise(IOError) do - io.eof? - end + io = IO.new(IO.sysopen($mrbtest_io_wfname, 'w'), 'w') + assert_raise(IOError) do + io.eof? end + io.close # empty file io = IO.open(IO.sysopen($mrbtest_io_wfname, 'w'), 'w') |
