[ruby-cvs:54018] nobu:r46872 (trunk): Fix `Time.parse` for out of range arguments with an offset

nobu at ruby-lang.org nobu at ruby-lang.org
Sat Jul 19 11:56:40 JST 2014


nobu	2014-07-19 11:56:39 +0900 (Sat, 19 Jul 2014)

  New Revision: 46872

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46872

  Log:
    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]
    * lib/rdoc/parser/changelog.rb (RDoc#parse_entries): fix dirty hack.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rdoc/parser/changelog.rb
    trunk/lib/time.rb
    trunk/test/test_time.rb


More information about the ruby-cvs mailing list