Heh, I wanted to post the first message on Google groups
I always wondered why such a strange way to read RAILS_GEM_VERSION in config/boot.rb:
environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/ rails_gem_version = $1
Basically it reads environment.rb as a file and searches for the constant if it's not commented out.
Why such a hackish way? The constant is already defined when boot.rb executes...
-Mislav