diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-29 08:54:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-29 08:54:18 +0000 |
commit | b9c6f284def3278bbd77c7ddd7ad85ab45baeef0 (patch) | |
tree | beecdcd4bc0f53d3333ef5c50fba74bd7616e496 | |
parent | 0dcfafd8eb69a2b26963d1d57ad11301498545b1 (diff) | |
download | ruby-b9c6f284def3278bbd77c7ddd7ad85ab45baeef0.tar.gz |
* instruby.rb: use ":=" assignment to avoid potential local
variable name conflict. [ruby-dev:30206]
* lib/date/format.rb (Date::Format::Bag::method_missing): add
prefix to avoid making t class-local instance variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/matzruby@11587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | instruby.rb | 22 | ||||
-rw-r--r-- | lib/date/format.rb | 2 | ||||
-rw-r--r-- | version.h | 6 |
4 files changed, 23 insertions, 15 deletions
@@ -1,3 +1,11 @@ +Mon Jan 29 17:52:44 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * instruby.rb: use ":=" assignment to avoid potential local + variable name conflict. [ruby-dev:30206] + + * lib/date/format.rb (Date::Format::Bag::method_missing): add + prefix to avoid making t class-local instance variable. + Fri Jan 26 07:48:57 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * enumerator.c (enumerator_init_copy): need to copy internal diff --git a/instruby.rb b/instruby.rb index 8327d8c570..0ec8ae772b 100755 --- a/instruby.rb +++ b/instruby.rb @@ -203,7 +203,7 @@ if $extout install?(:ext, :arch, :'ext-arch') do puts "installing extension objects" makedirs [archlibdir, sitearchlibdir] - if noinst = CONFIG["no_install_files"] and noinst.empty? + if noinst := CONFIG["no_install_files"] and noinst.empty? noinst = nil end install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst) @@ -219,7 +219,7 @@ install?(:rdoc) do if $rdocdir puts "installing rdoc" - ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR)/system') + ridatadir := File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR)/system') Config.expand(ridatadir) makedirs [ridatadir] install_recursive($rdocdir, ridatadir) @@ -232,23 +232,23 @@ install?(:local, :comm, :bin) do Dir.chdir srcdir makedirs [bindir, rubylibdir] - ruby_shebang = File.join(bindir, ruby_install_name) + ruby_shebang := File.join(bindir, ruby_install_name) if File::ALT_SEPARATOR - ruby_bin_dosish = ruby_shebang.tr(File::SEPARATOR, File::ALT_SEPARATOR) + ruby_bin_dosish := ruby_shebang.tr(File::SEPARATOR, File::ALT_SEPARATOR) end for src in Dir["bin/*"] next unless File.file?(src) next if /\/[.#]|(\.(old|bak|orig|rej|diff|patch|core)|~|\/core)$/i =~ src - name = ruby_install_name.sub(/ruby/, File.basename(src)) - dest = File.join(bindir, name) + name := ruby_install_name.sub(/ruby/, File.basename(src)) + dest := File.join(bindir, name) install src, dest, :mode => 0755 next if $dryrun - shebang = '' - body = '' + shebang := '' + body := '' open_for_install(dest, "r+") { |f| shebang = f.gets body = f.read @@ -261,7 +261,7 @@ install?(:local, :comm, :bin) do } if ruby_bin_dosish - batfile = File.join(bindir, name + ".bat") + batfile := File.join(bindir, name + ".bat") open_for_install(batfile, "wb") {|b| b.print((<<EOH+shebang+body+<<EOF).gsub(/\r?\n/, "\r\n")) @echo off @@ -287,7 +287,7 @@ install?(:local, :comm, :lib) do makedirs [rubylibdir] for f in Dir["lib/**/*{.rb,help-message}"] - dir = File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir + dir := File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir makedirs dir install f, dir, :mode => 0644 end @@ -316,7 +316,7 @@ install?(:local, :comm, :man) do for mdoc in Dir["*.[1-9]"] next unless File.file?(mdoc) and open(mdoc){|fh| fh.read(1) == '.'} - destdir = mandir + mdoc[/(\d+)$/] + destdir := mandir + mdoc[/(\d+)$/] destfile = File.join(destdir, mdoc.sub(/ruby/, ruby_install_name)) makedirs destdir diff --git a/lib/date/format.rb b/lib/date/format.rb index fa799acfd9..9fad75fe2c 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -99,7 +99,7 @@ class Date def method_missing(t, *args, &block) t = t.to_s set = t.chomp!('=') - t = '@' + t + t = '@v' + t if set instance_variable_set(t, *args) else @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-01-26" +#define RUBY_RELEASE_DATE "2007-01-29" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070126 +#define RUBY_RELEASE_CODE 20070129 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 26 +#define RUBY_RELEASE_DAY 29 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; |