aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-06-01 01:05:17 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-06-01 01:16:20 +0100
commitcf3364a03c665374f6419a8875474ebf8623ea67 (patch)
tree29d501af200663c0367df2c3754f3bacebbd2079 /activerecord/lib
parenteb7ef2ccd618bc87451b980722ec73ee41c203a1 (diff)
downloadrails-cf3364a03c665374f6419a8875474ebf8623ea67.tar.gz
rails-cf3364a03c665374f6419a8875474ebf8623ea67.tar.bz2
rails-cf3364a03c665374f6419a8875474ebf8623ea67.zip
Raise NameError instead of ArgumentError in ActiveSupport::Dependencies
ActiveSupport::Dependencies now raises NameError if it finds an existing constant in load_missing_constant. This better reflects the nature of the error which is usually caused by calling constantize on a nested constant. Closes #1423
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/base.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index f74810720d..08cc282d09 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1308,7 +1308,6 @@ MSG
rescue NameError => e
# We don't want to swallow NoMethodError < NameError errors
raise e unless e.instance_of?(NameError)
- rescue ArgumentError
end
end