Fix Time.parse for out of range arguments with an offset
lib/time.rb (Time#apply_offset): Guards against a nil return value from Time.month_days when offsetting date. Out of range values are then caught when Time.utc is called (as usual). Previously a nil return value from Time.month_days would have the < operator called on it, and raise NoMethodError. [fix GH-667]
Fix
Time.parsefor out of range arguments with an offsetnilreturnvalue from
Time.month_dayswhen offsetting date. Out of rangevalues are then caught when
Time.utcis called (as usual).Previously a
nilreturn value fromTime.month_dayswouldhave the
<operator called on it, and raiseNoMethodError.[fix GH-667]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e