aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2015-03-02 17:09:44 +0100
committerRobin Dupret <robin.dupret@gmail.com>2015-03-02 17:09:44 +0100
commit6b1ec17526f19e3aed96e09f2bddeb589e44fc15 (patch)
treefd1de0e3c1a4d4e10db13442b47ebdbe838e9a11
parent670b2889a3373ade44e2c7328089afb092787a92 (diff)
downloadrails-6b1ec17526f19e3aed96e09f2bddeb589e44fc15.tar.gz
rails-6b1ec17526f19e3aed96e09f2bddeb589e44fc15.tar.bz2
rails-6b1ec17526f19e3aed96e09f2bddeb589e44fc15.zip
Wrap inline rescue with or-equal calls
At the moment, `rescue_from` doesn't work with strings on Rubinius because of rubinius/rubinius#3272.
-rw-r--r--activesupport/lib/active_support/rescuable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb
index 1a02acd5b1..67aac32742 100644
--- a/activesupport/lib/active_support/rescuable.rb
+++ b/activesupport/lib/active_support/rescuable.rb
@@ -100,7 +100,7 @@ module ActiveSupport
# a string, otherwise a NameError will be raised by the interpreter
# itself when rescue_from CONSTANT is executed.
klass = self.class.const_get(klass_name) rescue nil
- klass ||= klass_name.constantize rescue nil
+ klass ||= (klass_name.constantize rescue nil)
klass === exception if klass
end