1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ruby.c (process_options): revert r25330, so that $0 can be seen

from required libraries by -r option.  [ruby-core:23717]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-06-05 00:57:02 +00:00
parent 45815f9c9d
commit 2ef85089ec
4 changed files with 19 additions and 7 deletions

View file

@ -319,10 +319,11 @@ class TestRubyOptions < Test::Unit::TestCase
def test_notfound
notexist = "./notexist.rb"
rubybin = Regexp.quote(EnvUtil.rubybin)
pat = /\A#{rubybin}:.* -- #{Regexp.quote(notexist)} \(LoadError\)\Z/
pat = Regexp.quote(notexist)
bug1573 = '[ruby-core:23717]'
assert_equal(false, File.exist?(notexist))
assert_in_out_err(["-r", notexist, "-ep"], "", [], pat)
assert_in_out_err([notexist], "", [], pat)
assert_in_out_err(["-r", notexist, "-ep"], "", [], /\A-e:.* -- #{pat} \(LoadError\)\Z/, bug1573)
assert_in_out_err([notexist], "", [], /\A#{pat}:.* -- #{pat} \(LoadError\)\Z/, bug1573)
end
def test_program_name