Time advance nsec bug #4316

merged 1 commit into from Jan 5, 2012

3 participants


#advance method of Time is not coping nsec fraction of time. It results in strange behaviour like:

Date.today.end_of_day != Date.today.end_of_day + 0.days

This pull requests fixes that.

Ruby on Rails member

Could you please squash those commits into one?

Pawel Pierzchala Nano seconds fraction of time is copied properly in Time#advance
When day, month or year was passed, advance created a new time
ignoring previous nsec fraction. Now nsec is passed through
usec as a Rational number.
@wrozka wrozka closed this Jan 5, 2012
@wrozka wrozka reopened this Jan 5, 2012

This is one commit now. Sorry for closing and reopening, I thought Github didn't pick up my changes.

@tenderlove tenderlove merged commit 1dbbe7b into rails:master Jan 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment