diff --git a/ChangeLog b/ChangeLog index 1ba22ff3c1..f73755489b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Feb 13 16:21:48 2008 NARUSE, Yui + + * lib/uri/generic.rb: revert r15442. 2nd argument of String#sub parse + escapes. [ruby-dev:33726] + + * bootstraptest/test_method.rb enc/depend instruby.rb lib/mkmf.rb + mkconfig.rb: revert r15443. ditto. + Wed Feb 13 11:20:26 2008 NAKAMURA Usaku * enc/depend: fix typo. diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 2d194cdda4..8b5d584e31 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -657,7 +657,7 @@ C1.new.m(1,2,3,4,5,6,7,8,9) tests.each{|setup, methods| setup = setup.dup; setup.strip! - setup = BASE.gsub(//, setup) + setup = BASE.gsub(//){setup} methods.split(/\n/).each{|m| m = m.dup; m.strip! next if m.empty? expr = "#{setup}; #{m}" diff --git a/enc/depend b/enc/depend index 71cadde38a..d97c9056c3 100644 --- a/enc/depend +++ b/enc/depend @@ -46,12 +46,12 @@ $(ENCSODIR)/<%=e%>.$(DLEXT): <%=obj%> echo EXPORTS > <%=df%> echo <%=EXPORT_PREFIX%>Init_<%=File.basename(e)%> >> <%=df%> % end - <%=link_so.sub(/\$\(OBJS\)/, obj).sub(/\$\(DEFFILE\)/, df.to_s).gsub(/-(?:implib|pdb):/, "\\&enc/#{e.sub(/[^\/]+\z/, '')}")%> + <%=link_so.sub(/\$\(OBJS\)/) {obj}.sub(/\$\(DEFFILE\)/) {df}.gsub(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}%> % end % dependencies.each do |e| enc/<%=e%>.$(OBJEXT): $(srcdir)/enc/<%=e%>.c - <%=COMPILE_C.sub(/\$\(<(?:.*)\)/, "$(srcdir)/enc/#{e}.c")%> + <%=COMPILE_C.sub(/\$\(<(?:.*)\)/) {"$(srcdir)/enc/#{e}.c"}%> % end clean: diff --git a/instruby.rb b/instruby.rb index 8380df41fb..9b07951e89 100755 --- a/instruby.rb +++ b/instruby.rb @@ -275,7 +275,7 @@ install?(:local, :comm, :bin) do shebang = f.gets body = f.read - if shebang.sub!(/^\#!.*?ruby\b/, "#!" + ruby_shebang) + if shebang.sub!(/^\#!.*?ruby\b/) {"#!" + ruby_shebang} f.rewind f.print shebang, body f.truncate(f.pos) diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 57fe0e4515..d907e0b4b2 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -1105,7 +1105,7 @@ module URI @@to_s = Kernel.instance_method(:to_s) def inspect - @@to_s.bind(self).call.sub!(/>\z/, " URL:#{self}>") + @@to_s.bind(self).call.sub!(/>\z/) {" URL:#{self}>"} end def coerce(oth) diff --git a/mkconfig.rb b/mkconfig.rb index e39307b48b..6a2eb64040 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -159,7 +159,7 @@ print <