Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove ruby 1.8 support code

  • Loading branch information...
commit 44bd9719e938dd8e8e6764f00d2c6ba40b4d34e3 1 parent dfa0c36
Sergey Nartimov lest authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 railties/lib/rails/generators/base.rb
8 railties/lib/rails/generators/base.rb
View
@@ -254,17 +254,13 @@ def class_collisions(*class_names) #:nodoc:
nesting = class_name.split('::')
last_name = nesting.pop
- # Hack to limit const_defined? to non-inherited on 1.9
- extra = []
- extra << false unless Object.method(:const_defined?).arity == 1
-
# Extract the last Module in the nesting
last = nesting.inject(Object) do |last_module, nest|
- break unless last_module.const_defined?(nest, *extra)
+ break unless last_module.const_defined?(nest, false)
last_module.const_get(nest)
end
- if last && last.const_defined?(last_name.camelize, *extra)
+ if last && last.const_defined?(last_name.camelize, false)
raise Error, "The name '#{class_name}' is either already used in your application " <<
"or reserved by Ruby on Rails. Please choose an alternative and run " <<
"this generator again."
Please sign in to comment.
Something went wrong with that request. Please try again.