* test/inlinetest.rb (InlineTest.in_progname): workaround for frozen

$0.  [ruby-dev:35261]

* lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-27 12:19:11 +00:00
Родитель 8f03e4d2c5
Коммит 4bcf877beb
3 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Fri Jun 27 21:19:08 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/inlinetest.rb (InlineTest.in_progname): workaround for frozen
$0. [ruby-dev:35261]
* lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto.
Fri Jun 27 17:45:17 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* lib/erb.rb: adjust line number for magic comment.

Просмотреть файл

@ -90,8 +90,11 @@ module Test
end
def test_started(name)
$0 += "\0#{name}"
$0.sub!(/\0.*\z/, '')
unless defined? $program_name
$program_name = $0
alias $0 $program_name
end
$PROGRAM_NAME += "\0#{name}"
output_single(name + ": ", VERBOSE)
end

Просмотреть файл

@ -33,12 +33,12 @@ module InlineTest
end
def self.in_progname(progname)
progname_backup = $0.dup
$0.replace(progname)
$program_name = progname
alias $0 $program_name
begin
yield
ensure
$0.replace(progname_backup)
alias $0 $PROGRAM_NAME
end
end