summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 69e3666..8a5b878 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1379,6 +1379,9 @@ class TestIO < Test::Unit::TestCase
fd = IO.sysopen(t.path, "w")
assert_kind_of(Integer, fd)
+ %w[r r+ w+ a+].each do |mode|
+ assert_raise(Errno::EINVAL, '[ruby-dev:38571]') {IO.new(fd, mode)}
+ end
f = IO.new(fd, "w")
f.write("FOO\n")
f.close