summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/drb/drb.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index ab2cba894..a3abd4511 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1455,13 +1455,16 @@ module DRb
setup_message
if $SAFE < @safe_level
+ info = Thread.current['DRb']
if @block
- @result = Thread.new {
+ @result = Thread.new {
+ Thread.current['DRb'] = info
$SAFE = @safe_level
perform_with_block
}.value
else
@result = Thread.new {
+ Thread.current['DRb'] = info
$SAFE = @safe_level
perform_without_block
}.value