Permalink
Browse files

Merge pull request #4745 from lest/patch-1

remove ruby 1.8 support code
  • Loading branch information...
josevalim committed Jan 30, 2012
2 parents dfa0c36 + 44bd971 commit 30327a00a0a809ca1c8d7dc0fe3261159346f066
Showing with 2 additions and 6 deletions.
  1. +2 −6 railties/lib/rails/generators/base.rb
@@ -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."

1 comment on commit 30327a0

@spastorino

This comment has been minimized.

Show comment Hide comment
@spastorino

spastorino Jan 31, 2012

Owner

According to travis this breaks the build /cc @lest
http://travis-ci.org/#!/rails/rails/builds/597316

Owner

spastorino commented on 30327a0 Jan 31, 2012

According to travis this breaks the build /cc @lest
http://travis-ci.org/#!/rails/rails/builds/597316

Please sign in to comment.