Skip to content
This repository
Browse code

remove ruby 1.8 support code

  • Loading branch information...
commit 44bd9719e938dd8e8e6764f00d2c6ba40b4d34e3 1 parent dfa0c36
Sergey Nartimov authored January 29, 2012

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

  1. 8  railties/lib/rails/generators/base.rb
8  railties/lib/rails/generators/base.rb
@@ -254,17 +254,13 @@ def class_collisions(*class_names) #:nodoc:
254 254
             nesting = class_name.split('::')
255 255
             last_name = nesting.pop
256 256
 
257  
-            # Hack to limit const_defined? to non-inherited on 1.9
258  
-            extra = []
259  
-            extra << false unless Object.method(:const_defined?).arity == 1
260  
-
261 257
             # Extract the last Module in the nesting
262 258
             last = nesting.inject(Object) do |last_module, nest|
263  
-              break unless last_module.const_defined?(nest, *extra)
  259
+              break unless last_module.const_defined?(nest, false)
264 260
               last_module.const_get(nest)
265 261
             end
266 262
 
267  
-            if last && last.const_defined?(last_name.camelize, *extra)
  263
+            if last && last.const_defined?(last_name.camelize, false)
268 264
               raise Error, "The name '#{class_name}' is either already used in your application " <<
269 265
                            "or reserved by Ruby on Rails. Please choose an alternative and run "  <<
270 266
                            "this generator again."

0 notes on commit 44bd971

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