summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/drb/drb.rb4
-rw-r--r--test/drb/drbtest.rb5
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 152229cafa..718d0f57c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Feb 19 18:11:47 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * lib/drb/drb.rb (DRbObject#respond_to?): take two arguments.
+ [ruby-dev:25722]
+
+ * test/drb/drbtest.rb: ditto.
+
Sat Feb 19 13:52:02 2005 Tanaka Akira <akr@m17n.org>
* lib/open-uri.rb: call OpenSSL::SSL::SSLSocket#post_connection_check
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index e7ef36a567..8eec4a7f1c 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1046,14 +1046,14 @@ module DRb
undef :to_s
undef :to_a if respond_to?(:to_a)
- def respond_to?(msg_id)
+ def respond_to?(msg_id, priv=false)
case msg_id
when :_dump
true
when :marshal_dump
false
else
- method_missing(:respond_to?, msg_id)
+ method_missing(:respond_to?, msg_id, priv)
end
end
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index b0ba7629a6..6c4cfe6f77 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -94,6 +94,11 @@ module DRbCore
assert_equal(6, @there.sample(onecky, 1, 2))
ary = @there.to_a
assert_kind_of(DRb::DRbObject, ary)
+
+ assert(@there.respond_to?(:to_a, true))
+ assert(@there.respond_to?(:eval, true))
+ assert(! @there.respond_to?(:eval, false))
+ assert(! @there.respond_to?(:eval))
end
def test_01_02_loop