parent
2bcfdad006
commit
fb472ca7ad
@ -1131,7 +1131,7 @@ module DRb
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Routes method calls to the referenced remote object.
|
# Routes method calls to the referenced remote object.
|
||||||
def method_missing(msg_id, *a, &b)
|
ruby2_keywords def method_missing(msg_id, *a, &b)
|
||||||
if DRb.here?(@uri)
|
if DRb.here?(@uri)
|
||||||
obj = DRb.to_obj(@ref)
|
obj = DRb.to_obj(@ref)
|
||||||
DRb.current_server.check_insecure_method(obj, msg_id)
|
DRb.current_server.check_insecure_method(obj, msg_id)
|
||||||
|
@ -349,4 +349,20 @@ class TestDRbTCP < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TestBug16634 < Test::Unit::TestCase
|
||||||
|
include DRbBase
|
||||||
|
|
||||||
|
def setup
|
||||||
|
super
|
||||||
|
setup_service 'ut_drb.rb'
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_bug16634
|
||||||
|
assert_equal(42, @there.keyword_test1(a: 42))
|
||||||
|
assert_equal("default", @there.keyword_test2)
|
||||||
|
assert_equal(42, @there.keyword_test2(b: 42))
|
||||||
|
assert_equal({:a=>42, :b=>42}, @there.keyword_test3(a: 42, b: 42))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -148,6 +148,18 @@ class DRbEx
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def keyword_test1(a:)
|
||||||
|
a
|
||||||
|
end
|
||||||
|
|
||||||
|
def keyword_test2(b: "default")
|
||||||
|
b
|
||||||
|
end
|
||||||
|
|
||||||
|
def keyword_test3(**opt)
|
||||||
|
opt
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def call_private_method
|
def call_private_method
|
||||||
true
|
true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user