On Thu, Sep 13, 2012 at 11:02 PM, Matthew Kerwin <[email protected]> wrote:
> On 13 September 2012 23:43, Robert Klemme <[email protected]> wrote:
>>
>> Your #succ method does not overflow.  I would make the class immutable
>> since that has some advantages.
>
> Actually my #succ did overflow, because the constructor used the
> #minutes= method which, with the exception of a modulus error pointed
> out earlier, overflowed into @hours.  I agree, though, that making it
> immutable would be easier.

Oh, I am sorry, I overlooked that.

>  However this is all moot since it turns
> out it's a question of overlapping time ranges, which can be solved in
> more interesting ways.

Still these types of exercise train our Ruby skills so it wasn't
completely in vain. :-)

Btw, where did it turn out?  I can't see it on the mailing list.

> My intuitive approach would be the latter.  If I wasn't about to get
> my kids up and ready for school I'd probably hash out another
> almost-correct algorithmic outline right now.

:-)

Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to