diff options
Diffstat (limited to 'activesupport/lib/active_support/testing/constant_lookup.rb')
-rw-r--r-- | activesupport/lib/active_support/testing/constant_lookup.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 52bfeb7179..1b2a75c35d 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -38,6 +38,8 @@ module ActiveSupport begin constant = names.join("::").constantize break(constant) if yield(constant) + rescue NoMethodError # subclass of NameError + raise rescue NameError # Constant wasn't found, move on ensure |