ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90897] [Ruby trunk Bug#15506] ArgumentError on some ordinal dates
       [not found] <redmine.issue-15506.20190105172850@ruby-lang.org>
@ 2019-01-05 17:28 ` victor
  2019-01-15  8:54 ` [ruby-core:91096] " naruse
  1 sibling, 0 replies; 2+ messages in thread
From: victor @ 2019-01-05 17:28 UTC (permalink / raw)
  To: ruby-core

Issue #15506 has been reported by v49564 (Victor Bruley).

----------------------------------------
Bug #15506: ArgumentError on some ordinal dates
https://bugs.ruby-lang.org/issues/15506

* Author: v49564 (Victor Bruley)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Seems the bug was introduced with r64028:
Adding the difference between two ordinal dates (source:lib/time.rb#L210 : `day += diff`) results in month days superior to 31 for dates at the beginning of a month, causing the out of range error.

~~~
require "time"
Time.strptime("91095", "%y%j")
 => 1991-04-05 00:00:00 -0400

Time.strptime("91093", "%y%j")
Traceback (most recent call last):
        4: from lib/ruby/2.6.0/time.rb:451:in `strptime'
        3: from lib/ruby/2.6.0/time.rb:211:in `make_time'
        2: from lib/ruby/2.6.0/time.rb:257:in `make_time'
        1: from lib/ruby/2.6.0/time.rb:257:in `local'
ArgumentError (argument out of range)
~~~




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:91096] [Ruby trunk Bug#15506] ArgumentError on some ordinal dates
       [not found] <redmine.issue-15506.20190105172850@ruby-lang.org>
  2019-01-05 17:28 ` [ruby-core:90897] [Ruby trunk Bug#15506] ArgumentError on some ordinal dates victor
@ 2019-01-15  8:54 ` naruse
  1 sibling, 0 replies; 2+ messages in thread
From: naruse @ 2019-01-15  8:54 UTC (permalink / raw)
  To: ruby-core

Issue #15506 has been updated by naruse (Yui NARUSE).

Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE

ruby_2_6 r66825 merged revision(s) 66735.

----------------------------------------
Bug #15506: ArgumentError on some ordinal dates
https://bugs.ruby-lang.org/issues/15506#change-76332

* Author: v49564 (Victor Bruley)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
Seems the bug was introduced with r64028:
Adding the difference between two ordinal dates (source:lib/time.rb#L210 : `day += diff`) results in month days superior to 31 for dates at the beginning of a month, causing the out of range error.

~~~
require "time"
Time.strptime("91095", "%y%j")
 => 1991-04-05 00:00:00 -0400

Time.strptime("91093", "%y%j")
Traceback (most recent call last):
        4: from lib/ruby/2.6.0/time.rb:451:in `strptime'
        3: from lib/ruby/2.6.0/time.rb:211:in `make_time'
        2: from lib/ruby/2.6.0/time.rb:257:in `make_time'
        1: from lib/ruby/2.6.0/time.rb:257:in `local'
ArgumentError (argument out of range)
~~~




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-15  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15506.20190105172850@ruby-lang.org>
2019-01-05 17:28 ` [ruby-core:90897] [Ruby trunk Bug#15506] ArgumentError on some ordinal dates victor
2019-01-15  8:54 ` [ruby-core:91096] " naruse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).