Skip to content
This repository
Browse code

Fix broken GemDependency#==. You should ALWAYS check the class!

  • Loading branch information...
commit 01a9fbbcca6f5345fbf9522e28cda0ae17899f67 1 parent 8d4ca9e
Ryan Davis authored May 12, 2011

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  railties/lib/rails/gem_dependency.rb
3  railties/lib/rails/gem_dependency.rb
@@ -274,7 +274,8 @@ def write_specification(spec)
274 274
     end
275 275
 
276 276
     def ==(other)
277  
-      self.name == other.name && self.requirement == other.requirement
  277
+      Gem::Dependency === other.class &&
  278
+        self.name == other.name && self.requirement == other.requirement
278 279
     end
279 280
     alias_method :eql?, :"=="
280 281
 

0 notes on commit 01a9fbb

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