[Rbrainz-users] InvalidDate questions
nigel at maven-group.org
Mon Jul 9 06:04:09 EDT 2007
Philipp Wolfer wrote:
>> Why do you think it needs a different eql? The one in range wil work for
>> both incomplete dates and ranges and since we treat IncompleDate as a
>> special kind of Range I don't see a problem. What could be confusing
>> though is if we have 2 different value comparisons. (== and eql?).
> No, I just wondered why we need to re-implement eql? since it is
> already defined in Range. See
Oh thats what you mean. Actually my implementation accepts both Ranges
and scalars (meaning the value types used for the endpoints of the range).
When it gets a Range it acts just like the existing implementation in
Range but when it gets a scalar like 1 it treats it as a range with a
length of 1.
> But as I see now the difference is that the original Range only
> accepts other Range objects for comparison while you implementation
> allows other types as well. I hope we don't break anything in other's
> people code when we overwrite eql?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 163 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rbrainz-users/attachments/20070709/bb3b631b/attachment.vcf
More information about the Rbrainz-users