public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
//if (!super.equals(o)) return false;
RubyBignum that = (RubyBignum) o;
if (value_ != null ? !value_.equals(that.value_) :
that.value_ != null) return false;
return true;
}
I also notice that in ruby's level, there is a test delegating to
ruby's equal:
(in RubyValue)
public boolean equals(Object o) {
if (this == o) {
return true;
} else if (o instanceof RubyValue) {
RubyValue v = RubyAPI.callPublicOneArgMethod(this, (RubyValue)o,
null, CommonRubyID.equalID);
return RubyAPI.testTrueFalse(v);
} else {
return false;
}
}
so then there is some problems, what is an equal? in traditional java
level or in delegating ruby level? tell me what your thoughts.
(and just a note: why doesn't code in RubyValue work, it seems ok now?)
The problem is Bignum#== is not implemented in xruby 0.2.1 :), so it goes to
Kernel#==, which returns true only if the two are the same instance.
_________________________________________________________________
Local listings, incredible imagery, and driving directions - all in one
place! http://maps.live.com/?wip=69&FORM=MGAC01
> place! http://maps.live.com/?wip=69&FORM=MGAC01,