diff options
author | Marcel Molina <marcel@vernix.org> | 2005-10-08 20:12:16 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-10-08 20:12:16 +0000 |
commit | 24b9d2fe7115362677ed940b9e6117b185c1c1b2 (patch) | |
tree | 6cdf3e53454023d51c2892be54c2ef267294d119 /railties/lib/rails_generator | |
parent | d94994867f793fcf24ee03d5a45475a9ed90c599 (diff) | |
download | rails-24b9d2fe7115362677ed940b9e6117b185c1c1b2.tar.gz rails-24b9d2fe7115362677ed940b9e6117b185c1c1b2.tar.bz2 rails-24b9d2fe7115362677ed940b9e6117b185c1c1b2.zip |
Backing out of #2496. Comparing md5 checksums is in no way faster than doing a direct compare. Benchmarks help.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index aa9bc677ef..2da82f545d 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -1,7 +1,6 @@ require 'delegate' require 'optparse' require 'fileutils' -require 'digest/md5' require 'erb' module Rails @@ -221,7 +220,7 @@ module Rails return false if File.directory? destination source = block_given? ? File.open(source) {|sf| yield(sf)} : IO.read(source) destination = IO.read(destination) - Digest::MD5.hexdigest(source) == Digest::MD5.hexdigest(destination) + source == destination end # Generate a file for a Rails application using an ERuby template. |