diff options
author | Andrew Bloomgarden <stalkingtiger@gmail.com> | 2010-06-01 22:47:34 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-08 15:34:47 -0400 |
commit | 0e9b9d59859efa46a82b56e0715784fa52656650 (patch) | |
tree | d779373d72176101829b54d4946c59b72a4bed3d /activerecord/lib | |
parent | bdcf70cca89df906a3510464ef46a44646fd29a3 (diff) | |
download | rails-0e9b9d59859efa46a82b56e0715784fa52656650.tar.gz rails-0e9b9d59859efa46a82b56e0715784fa52656650.tar.bz2 rails-0e9b9d59859efa46a82b56e0715784fa52656650.zip |
Fix ActiveRecord::Base.compute_type swallowing NoMethodError. [#4751 state:resolved]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index aa2826fb33..7cff6d9f1a 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1219,7 +1219,9 @@ module ActiveRecord #:nodoc: begin constant = candidate.constantize return constant if candidate == constant.to_s - rescue NameError + rescue NameError => e + # We don't want to swallow NoMethodError < NameError errors + raise e unless e.instance_of?(NameError) rescue ArgumentError end end |