From: Stephen Bannasch Date: 2011-01-06T10:04:53+09:00 Subject: [ruby-core:34145] [Ruby 1.9-Bug#4235] svn keywords in code prevent correct building of ruby using git mirror Issue #4235 has been updated by Stephen Bannasch. I updated rvm and used it to install a trunk version of Ruby which it cloned with git: $ rvm use ruby-head Using /Users/stephen/.rvm/gems/ruby-head running hook after_use $ ruby -v ruby 1.9.3dev (2011-01-06 trunk 30471) [x86_64-darwin10.5.0] The original form of the subversion keywords are still located in the source files. For example line 211 of lib/optparse.rb: $ grep -n -C 3 '\$Id\$' /Users/stephen/.rvm/rubies/ruby-head/lib/ruby/1.9.1/optparse.rb 208-# 209-class OptionParser 210- # :stopdoc: 211: RCSID = %w$Id$[1..-1].each {|s| s.freeze}.freeze 212- Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1]) 213- LastModified = (Time.gm(*RCSID[2, 2].join('-').scan(/\d+/).collect {|s| s.to_i}) if RCSID[2]) 214- Release = RCSID[2] But it turns out that the constants: Version LastModified are just set to nil -- no errors are thrown. In the past missing keyword substitution caused runtime errors. It appears that is no longer the case. usage in optparse.rb: >> RCSID = %w$Id$[1..-1].each {|s| s.freeze}.freeze => [] >> Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1]) => nil >> LastModified = (Time.gm(*RCSID[2, 2].join('-').scan(/\d+/).collect {|s| s.to_i}) if RCSID[2]) => nil usage in http.rb, pop.rb, and smtp.rb: >> Revision = %q$Revision$.split[1] => nil usage in rexml.rb: >> REVISION = %w$Revision$[1] || '' => "" usage in lib/logger.rb: >> _, name, rev = %w$Id$ => ["Id"] ---------------------------------------- http://redmine.ruby-lang.org/issues/show/4235 ---------------------------------------- http://redmine.ruby-lang.org