Index: lib/rinda/ring.rb =================================================================== --- lib/rinda/ring.rb (revision 43869) +++ lib/rinda/ring.rb (working copy) @@ -212,7 +212,7 @@ module Rinda # address of the local TupleSpace. def do_reply - tuple = @ts.take([:lookup_ring, DRbObject], @renewer) + tuple = @ts.take([:lookup_ring, nil], @renewer) Thread.new { tuple[1].call(@ts) rescue nil} rescue end Index: test/rinda/test_rinda.rb =================================================================== --- test/rinda/test_rinda.rb (revision 43869) +++ test/rinda/test_rinda.rb (working copy) @@ -558,6 +558,40 @@ class TestRingServer < Test::Unit::TestC @rs.shutdown end + def test_do_reply + called = nil + + callback = proc { |ts| + called = ts + } + + callback = DRb::DRbObject.new callback + + @ts.write [:lookup_ring, callback] + + @rs.do_reply + + Thread.pass until called + + assert_same @ts, called + end + + def test_do_reply_local + called = nil + + callback = proc { |ts| + called = ts + } + + @ts.write [:lookup_ring, callback] + + @rs.do_reply + + Thread.pass until called + + assert_same @ts, called + end + def test_make_socket_unicast v4 = @rs.make_socket('127.0.0.1')