Tag Archives: time

The perils of syntactic sugar in Ruby

I ran into this doozy today:

In math, a+b always equals b+a. Not always the case with Ruby and Time objects.

addthis_url = ‘http%3A%2F%2Fwww.alandelevie.com%2F2010%2F07%2F19%2Fthe-perils-of-syntactic-sugar-in-ruby%2F’;
addthis_title = ‘The+perils+of+syntactic+sugar+in+Ruby’;
addthis_pub = ”;