From: "Ara.T.Howard" Date: 2005-11-24T06:23:30+09:00 Subject: Re: syntax error warning: useless use of a variable in void context On Thu, 24 Nov 2005, Tom Reilly wrote: > class Tl > def initialize(a,b) > @a = a > @b = b > end > def to_s > "#{@a} #{@b}" > end > def <=>(tlr) > if @a > tlr.@a ^ ^ ^ you can't do this. probably you want attr "a" ... tlr.a hth. -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================