summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-13 06:26:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-13 06:26:30 +0000
commit081df640833fb4871048bcecffe61f110facd352 (patch)
tree8cf9347f856e702560eb98221f55c2f72a47c25f /test
parent83c961665def138e78a66d8bef0b4fa1da49ac69 (diff)
file.c: chardev is loadable
* file.c (ruby_is_fd_loadable): allow character devices to load, e.g., `ruby /dev/null` exits successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index ddfd5f1883..e6659d4c30 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -1020,4 +1020,9 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
end
+
+ def test_null_script
+ skip "#{IO::NULL} is not a character device" unless File.chardev?(IO::NULL)
+ assert_in_out_err([IO::NULL], success: true)
+ end
end