Skip to content
Browse files

Use Gem.find_name instead of search when freezing gems. Prevent false…

… positive for other gems with rails in the name. Closes #8729 [wselman]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 6391e19 commit 94e5b10aff8adbda671d5b63a8ad46b1e1263b18 @NZKoz NZKoz committed
Showing with 4 additions and 2 deletions.
  1. +2 −0 railties/CHANGELOG
  2. +2 −2 railties/lib/tasks/framework.rake
View
2 railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* use Gem.find_name instead of search when freezing gems. Prevent false positives for other gems with rails in the name. Closes #8729 [wselman]
+
* Automatically generate add/remove column commands in specially named migrations like AddLocationToEvent. Closes #9006 [zenspider]
* Default to plural table name in Rails Generator if ActiveRecord is not present. Closes #8963 [evan]
View
4 railties/lib/tasks/framework.rake
@@ -7,8 +7,8 @@ namespace :rails do
Gem.manage_gems
rails = (version = ENV['VERSION']) ?
- Gem.cache.search('rails', "= #{version}").first :
- Gem.cache.search('rails').sort_by { |g| g.version }.last
+ Gem.cache.find_name('rails', "= #{version}").first :
+ Gem.cache.find_name('rails').sort_by { |g| g.version }.last
version ||= rails.version

0 comments on commit 94e5b10

Please sign in to comment.
Something went wrong with that request. Please try again.