summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-14 16:44:11 -0700
committerJeremy Evans <code@jeremyevans.net>2019-10-16 12:51:13 -0700
commit50b8033d6b7404670ee985de1473fffc10dd7d9c (patch)
tree603565e3db21870b2cd11e00449a59b56b027587 /lib
parent2993b24a1ecc5fa3cc9f140bfd80669c3a3b7b9c (diff)
Handle subclasses of Exception in drb
This makes it so that client instances that call a method on a server-side object that raise a subclass of Exception are handled similarly to those that raise a subclass of StandardError. Only reraise exceptions that we are fairly sure we don't want to rescue. Fixes [Bug #5618]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2554
Diffstat (limited to 'lib')
-rw-r--r--lib/drb/drb.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 15eba3f4f1..25642dd939 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1701,7 +1701,9 @@ module DRb
end
end
return @succ, @result
- rescue StandardError, ScriptError, Interrupt
+ rescue NoMemoryError, SystemExit, SystemStackError, SecurityError
+ raise
+ rescue Exception
@result = $!
return @succ, @result
end