summaryrefslogtreecommitdiff
path: root/lib/drb/eq.rb
diff options
context:
space:
mode:
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 00000000000..e24512d6a71
--- /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