diff options
author | Semyon Perepelitsa <sema@sema.in> | 2012-01-31 18:09:11 +0800 |
---|---|---|
committer | Semyon Perepelitsa <sema@sema.in> | 2012-01-31 18:09:11 +0800 |
commit | d0706c3626fcab9cd87a522071a3f6027a6fb79d (patch) | |
tree | 2b9296b7a94f37bd0195216c03140939a4be9ff8 /activesupport/lib/active_support | |
parent | 81f6bcb6d5d724a81976f777306b6837c5e713f1 (diff) | |
download | rails-d0706c3626fcab9cd87a522071a3f6027a6fb79d.tar.gz rails-d0706c3626fcab9cd87a522071a3f6027a6fb79d.tar.bz2 rails-d0706c3626fcab9cd87a522071a3f6027a6fb79d.zip |
There is an "inherit" option on const_get too, why not use it?
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 4e6eb27756..12dc86aeac 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -212,7 +212,7 @@ module ActiveSupport constant = Object names.each do |name| - constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) + constant = constant.const_get(name, false) end constant end |