mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
c19cba4414
commit
af54c1694c
3 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 5 11:27:08 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (load_file_internal): decrement for ungotten line.
|
||||
[ruby-dev:42680]
|
||||
|
||||
Sun Dec 5 10:32:11 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* complex.c: parenthesize macro arguments.
|
||||
|
|
1
ruby.c
1
ruby.c
|
@ -1551,6 +1551,7 @@ load_file_internal(VALUE arg)
|
|||
rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc));
|
||||
|
||||
if (xflag || opt->xflag) {
|
||||
line_start--;
|
||||
search_shebang:
|
||||
forbid_setid("-x");
|
||||
opt->xflag = FALSE;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue