From 157ee2bdbc0d81991ce55fe3a0807bc21bd30462 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Aug 2017 05:54:56 +0000 Subject: 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 --- test/ruby/test_rubyoptions.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3