Actions
Bug #2224
closedlib/delegate: operator delegation
Description
=begin
The operators ==, =~, !~ are forwarded by Delegate. I presume the operators != and ~, new in 1.9, have simply been forgotten?
As for eql? and hash, this is probably intentional. I am still curious as to why, since this can yield surprising results (at least to me):
a = "foo"
a1 = SimpleDelegator.new(a)
a2 = a1.dup
h = {}
h[a] = :bar
h[a1] = :bar
h[a2] = :bar
h # ==> {"foo"=>:bar, "foo"=>:bar, "foo"=>:bar}
=end
Actions
Like0
Like0Like0Like0