summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/test/io.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-04-15 09:58:20 +0900
committerGitHub <[email protected]>2020-04-15 09:58:20 +0900
commitc91c9e2429b31fb2f35ed297152100084531b0cb (patch)
tree7ebd978eedec3f299df7ea4fc1ed639838819385 /mrbgems/mruby-io/test/io.rb
parent7add524041df0f2482e587ec1a3920c6f34624a4 (diff)
parent3c03385e2e5f4d1d87c5ebcd35c92a41619c9f96 (diff)
downloadmruby-c91c9e2429b31fb2f35ed297152100084531b0cb.tar.gz
mruby-c91c9e2429b31fb2f35ed297152100084531b0cb.zip
Merge pull request #4968 from dearblue/check-fd
Check the file descriptor with `IO#initialize`; resolve #4966
Diffstat (limited to 'mrbgems/mruby-io/test/io.rb')
-rw-r--r--mrbgems/mruby-io/test/io.rb4
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