# frozen_string_literal: false
# for ruby-1.8.0
module DRb # :nodoc: all
class DRbServer
module InvokeMethod18Mixin
def block_yield(x)
if x.size == 1 && x[0].class == Array
x[0] = DRbArray.new(x[0])
end
@block.call(*x)
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
case jump_error.reason
when :break
break(jump_error.exit_value)
else
raise jump_error
end
end
block_value
end
end
end
end
end
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| acl.rb | File | 4.61 KB | 0644 |
|
| drb.rb | File | 57.49 KB | 0644 |
|
| eq.rb | File | 275 B | 0644 |
|
| extserv.rb | File | 836 B | 0644 |
|
| extservm.rb | File | 1.75 KB | 0644 |
|
| gw.rb | File | 3 KB | 0644 |
|
| invokemethod.rb | File | 777 B | 0644 |
|
| observer.rb | File | 671 B | 0644 |
|
| ssl.rb | File | 11.52 KB | 0644 |
|
| timeridconv.rb | File | 2.16 KB | 0644 |
|
| unix.rb | File | 2.78 KB | 0644 |
|
| version.rb | File | 35 B | 0644 |
|
| weakidconv.rb | File | 1.12 KB | 0644 |
|