summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-10 05:54:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-10 05:54:56 +0000
commit157ee2bdbc0d81991ce55fe3a0807bc21bd30462 (patch)
tree7570b081f3d64fdb5c3b6cb7d3e56339d48c0cc5 /test/ruby/test_rubyoptions.rb
parent6881279149bb452ed1787cdf60c8e614178c0b6a (diff)
ruby.c: ignore non-option in shebang line
* ruby.c (moreswitches): process all words as options only in an environment variable, but not in a shebang line. [ruby-core:82267] [Bug #13786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index c7d1bcdea4..d6297c8979 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -338,6 +338,8 @@ class TestRubyOptions < Test::Unit::TestCase
%w[4], [], bug4118)
assert_in_out_err(%w[-x], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
%w[4], [], bug4118)
+
+ assert_ruby_status(%w[], "#! ruby -- /", '[ruby-core:82267] [Bug #13786]')
end
def test_sflag