Issue #12702 has been reported by John Anderson.

----------------------------------------
Bug #12702: DRb client fails when calling out-of-process remote method with a block
https://bugs.ruby-lang.org/issues/12702

* Author: John Anderson
* Status: Open
* Priority: Normal
* Assignee: Masatoshi Seki
* ruby -v: ruby 2.4.0dev (2016-08-24 trunk 55999) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
See attached code for test case.

applies to ruby-2.3.1 and ruby-2.4.0dev (2016-08-24 trunk 55999)

The problem starts in DRbObject#method_missing where
the code following DRb.here? is used for the in-process case which works.

But the code in the block for

  succ, result = self.class.with_friend(@uri) do

is used for the out-of-process case. Here, DrbMessage#send_request fails
because b is a Proc, and in DrbMessage#dump the call to make_proxy fails
because DRbObject.new(b) fails.


---Files--------------------------------
drb_block_error.rb (1.46 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>