summaryrefslogtreecommitdiffstats
path: root/lib/drb/eq.rb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 15:45:12 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 15:45:12 +0000
commit3babfd92df08cc0c61cfa4cae5d8ffcdbc8c3923 (patch)
tree6ca5c5e535d66aaf094e954446846955f2e18a88 /lib/drb/eq.rb
parent7fe632bef8d8b608f8763e1a36b9b08ed5b7c83a (diff)
downloadruby-3babfd92df08cc0c61cfa4cae5d8ffcdbc8c3923.tar.gz
ruby-3babfd92df08cc0c61cfa4cae5d8ffcdbc8c3923.tar.xz
ruby-3babfd92df08cc0c61cfa4cae5d8ffcdbc8c3923.zip
import from drb-2.0.4b3
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/eq.rb')
-rw-r--r--lib/drb/eq.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/drb/eq.rb b/lib/drb/eq.rb
new file mode 100644
index 000000000..e24512d6a
--- /dev/null
+++ b/lib/drb/eq.rb
@@ -0,0 +1,16 @@
+require 'drb/drb'
+
+module DRb
+ class DRbObject
+ def ==(other)
+ return false unless DRbObject === other
+ (@ref == other.__drbref) && (@uri == other.__drburi)
+ end
+
+ def hash
+ [@uri, @ref].hash
+ end
+
+ alias eql? ==
+ end
+end