From dae780ba0b567f3faef4e8c1439c6c0841532bff Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 12 Feb 2008 06:28:23 +0000 Subject: * bootstraptest/runner.rb, bootstraptest/test_method.rb, enc/depend, instruby.rb, lib/mkmf.rb, lib/test/unit/util/procwrapper.rb, mkconfig.rb, sample/test.rb, template/vm.inc.tmpl, test/ruby/test_stringchar.rb: fixes arround String#gsub. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 12 ++++++------ lib/test/unit/util/procwrapper.rb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 45bf90872..9629a648a 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1512,10 +1512,10 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} f.gsub!("/", sep) dir.gsub!("/", sep) sep = ":/="+sep - f.gsub!(/(\$\(\w+)(\))/) {$1+sep+$2} - f.gsub!(/(\$\{\w+)(\})/) {$1+sep+$2} - dir.gsub!(/(\$\(\w+)(\))/) {$1+sep+$2} - dir.gsub!(/(\$\{\w+)(\})/) {$1+sep+$2} + f.gsub!(/(\$\(\w+)(\))/, "\\1#{sep}\\2") + f.gsub!(/(\$\{\w+)(\})/, "\\1#{sep}\\2") + dir.gsub!(/(\$\(\w+)(\))/, "\\1#{sep}\\2") + dir.gsub!(/(\$\{\w+)(\})/, "\\1#{sep}\\2") end mfile.print "\t$(INSTALL_PROG) #{f} #{dir}\n" if defined?($installed_list) @@ -1546,8 +1546,8 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} if sep f = f.gsub("/", sep) sep = ":/="+sep - f = f.gsub(/(\$\(\w+)(\))/) {$1+sep+$2} - f = f.gsub(/(\$\{\w+)(\})/) {$1+sep+$2} + f = f.gsub(/(\$\(\w+)(\))/, "\\1#{sep}\\2") + f = f.gsub(/(\$\{\w+)(\})/, "\\1#{sep}\\2") else sep = "" end diff --git a/lib/test/unit/util/procwrapper.rb b/lib/test/unit/util/procwrapper.rb index 4d49a52a9..ad3b4d8a6 100644 --- a/lib/test/unit/util/procwrapper.rb +++ b/lib/test/unit/util/procwrapper.rb @@ -22,7 +22,7 @@ module Test # Creates a new wrapper for a_proc. def initialize(a_proc) @a_proc = a_proc - @hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/){''}.sub(/(>)$/){''}.hex + @hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/, '').sub(/(>)$/, '').hex end def hash # :nodoc: -- cgit