diff options
| author | dearblue <[email protected]> | 2020-04-11 11:18:47 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2020-04-12 14:18:36 +0900 |
| commit | 3c03385e2e5f4d1d87c5ebcd35c92a41619c9f96 (patch) | |
| tree | 1767442eab662dbcf9f892a06d53e853add80560 /mrbgems/mruby-io/test | |
| parent | 63c7ff341a53a689209e67f9f1c885fcff596cf8 (diff) | |
| download | mruby-3c03385e2e5f4d1d87c5ebcd35c92a41619c9f96.tar.gz mruby-3c03385e2e5f4d1d87c5ebcd35c92a41619c9f96.zip | |
Check the file descriptor with `IO#initialize`; resolve #4966
Diffstat (limited to 'mrbgems/mruby-io/test')
| -rw-r--r-- | mrbgems/mruby-io/test/io.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb index 458d2cdc2..2088a61e3 100644 --- a/mrbgems/mruby-io/test/io.rb +++ b/mrbgems/mruby-io/test/io.rb @@ -24,6 +24,10 @@ def assert_io_open(meth) end end io2.close unless meth == :open + + assert_raise(RuntimeError) { IO.__send__(meth, 1023) } # For Windows + assert_raise(RuntimeError) { IO.__send__(meth, 1 << 26) } + assert_raise(RuntimeError) { IO.__send__(meth, 1 << 32) } if (1 << 32).kind_of?(Integer) end end |
