Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* 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
  • Loading branch information...
commit 4bcf877beb7bc1b61f5e6c542619c7991fb5e399 1 parent 8f03e4d
@nobu nobu authored
View
7 ChangeLog
@@ -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.
View
7 lib/test/unit/ui/console/testrunner.rb
@@ -90,8 +90,11 @@ def finished(elapsed_time)
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
View
6 test/inlinetest.rb
@@ -33,12 +33,12 @@ def self.in_critical(&block)
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
Please sign in to comment.
Something went wrong with that request. Please try again.