diff options
author | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-28 22:03:41 +0000 |
---|---|---|
committer | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-28 22:03:41 +0000 |
commit | d5f31755fc38100a76e0d89f07951995504a4bf7 (patch) | |
tree | d973359be9b5c080546012283c9d072ea29ce2ce /lib/drb/drb.rb | |
parent | 3d4c49ee3bc232431ce67c6008b785f7e80544d4 (diff) | |
download | ruby-d5f31755fc38100a76e0d89f07951995504a4bf7.tar.gz |
import drb-2.0.4 (use LocalJumpeError#reason)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/drb.rb')
-rw-r--r-- | lib/drb/drb.rb | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index 85cd3bc898..e6ea35cfc1 100644 --- a/lib/drb/drb.rb +++ b/lib/drb/drb.rb @@ -689,17 +689,6 @@ module DRb end end - def rescue_local_jump(err) - case err.message - when /^retry/ # retry from proc-closure - return :retry - when /^break/ # break from proc-closure - return rescue_break(err) - else - return :unknown - end - end - end if RUBY_VERSION >= '1.8' @@ -708,43 +697,7 @@ module DRb include InvokeMethod18Mixin end else - module InvokeMethod16Mixin - def block_yield(x) - if x.class == Array - block_value = @block.__drb_yield(*x) - else - block_value = @block.__drb_yield(x) - end - end - - def rescue_break(err) - return :break - end - - def perform_with_block - @obj.__send__(@msg_id, *@argv) do |x| - jump_error = nil - begin - block_value = block_yield(x) - rescue LocalJumpError - jump_error = $! - end - if jump_error - reason ,= rescue_local_jump(jump_error) - case reason - when :retry - retry - when :break - break - else - raise jump_error - end - end - block_value - end - end - end - + require 'drb/invokemethod16' class InvokeMethod include InvokeMethod16Mixin end |