From: keiju@... (=?ISO-2022-JP?B?GyRCQFBETTc9PHkbKEI=?= ) Date: 1998-11-24T14:08:56+09:00 Subject: [ruby-dev:3652] Re: problem of Delegator けいじゅ@日本ラショナルソフトウェアです. In [ruby-dev :3647 ] the message: "[ruby-dev:3647] Re: problem of Delegator ", on Nov/24 12:37(JST) Yukihiro Matsumoto writes: >まつもと ゆきひろです >|このままでは, ハッシュ表が壊れるというかちゃんと動作しませんものね... > >そうです.金曜帰りの車の中で気がつきました. >が,ちゃんとした対応(対称にする)方法は思い付かないので, 難しいですよね. >hash, eql? は転送しないようにします. 転送しないとデフォルトの動作になっちゃうので大部嬉しくないことも多いで すね... ちょっと中途半端な案ですが. hashはそのまま転送 def eql?(other) type == other.type and __getobj__.eql?(other.__getobj__) end もしくは def eql?(other) other.kind_of(Delegator) and __getobj__.eql?(other.__getobj__) end というのはいかがでしょう? __ ................................石塚 圭樹@日本ラショナルソフトェア... ----------------------------------->> e-mail: keiju@rational.com <<---