From: Dave Thomas Date: 2001-02-24T00:52:30+09:00 Subject: [ruby-talk:11388] Re: Time without seconds (updated/fixed) David Alan Black writes: > Here's a followup question, based on playing around with this: > Why do the two ways of doing this (which I've stashed into > MyTime.floor) result in objects of different types? > mt = MyTime.at t - t.sec > tt = MyTime.at (tm = Time.new) - tm.sec Because Time defines an operator '-' which returns a new Time object. The first case is parsed as MyTime.at(t - t.sec) and the second as MyTime.at(tm = Time.new) - tm.sec The Pragmatic Pragma: use parantheses around method arguments! Regards Dave