On 10/13/06, Phrogz <> wrote:
> I think it is relevant, given that the Vector class is designed to be
> immutable. I would agree that the Vector class should probably define
> #eql? as an alias for #==.
It appears to be a typo in Matrix.rb - This is in ruby1.8.4:
class Vector
...
#
# Returns +true+ iff the two vectors have the same elements in the same order.
#
def ==(other)
return false unless Vector === other
other.compare_by(@elements)
end
alias eqn? ==
~~~
And Vector seems to be the only implementor of eqn?
rick@frodo:~/ruby-1.8.4$ ri eqn
------------------------------------------------------------ Vector#eqn?
eqn?(other)
------------------------------------------------------------------------
Alias for #==
And it's not yet fixed in 1.9
rick@frodo:~/ruby-1.8.4$ grep eqn /public/rubysource/ruby1.9/ruby/lib/matrix.rb
alias eqn? ==
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/