aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-05 02:27:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-05 02:27:13 +0000
commitaf54c1694cc4139d06797475f9091664d83d8a75 (patch)
tree95e55949112a7ef8883d83fa3177cdbfefdc9a20 /test/ruby/test_rubyoptions.rb
parentc19cba441465b3c51337fe07cf2847f19c137ab0 (diff)
downloadruby-af54c1694cc4139d06797475f9091664d83d8a75.tar.gz
* ruby.c (load_file_internal): decrement for ungotten line.
[ruby-dev:42680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index e47060f354..9fad50ae4c 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -271,6 +271,12 @@ class TestRubyOptions < Test::Unit::TestCase
assert_equal("\"\u3042\"", r.join.force_encoding(Encoding::UTF_8))
assert_equal([], e)
end
+
+ bug4118 = '[ruby-dev:42680]'
+ assert_in_out_err(%w[], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+ %w[4], [], bug4118)
+ assert_in_out_err(%w[-x], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+ %w[4], [], bug4118)
end
def test_sflag