ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time
@ 2012-08-13 19:24 slbug (Alex Grebennik)
  2012-08-13 20:01 ` [ruby-core:47161] [ruby-trunk - Bug #6864] " slbug (Alex Grebennik)
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: slbug (Alex Grebennik) @ 2012-08-13 19:24 UTC (permalink / raw)
  To: ruby-core


Issue #6864 has been reported by slbug (Alex Grebennik).

----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864

Author: slbug (Alex Grebennik)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.



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

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

* [ruby-core:47161] [ruby-trunk - Bug #6864] bad value for range when using infinity with date or time
  2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
@ 2012-08-13 20:01 ` slbug (Alex Grebennik)
  2012-11-03  3:47 ` [ruby-core:48793] [ruby-trunk - Bug #6864][Assigned] " mame (Yusuke Endoh)
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: slbug (Alex Grebennik) @ 2012-08-13 20:01 UTC (permalink / raw)
  To: ruby-core


Issue #6864 has been updated by slbug (Alex Grebennik).


And sometimes range behavior is cant be understood Range.new(Date.new(0), BigDecmial.new(9))
----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864#change-28841

Author: slbug (Alex Grebennik)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.



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

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

* [ruby-core:48793] [ruby-trunk - Bug #6864][Assigned] bad value for range when using infinity with date or time
  2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
  2012-08-13 20:01 ` [ruby-core:47161] [ruby-trunk - Bug #6864] " slbug (Alex Grebennik)
@ 2012-11-03  3:47 ` mame (Yusuke Endoh)
  2012-11-03  4:38 ` [ruby-core:48795] [ruby-trunk - Bug #6864] " tadf (tadayoshi funaba)
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mame (Yusuke Endoh) @ 2012-11-03  3:47 UTC (permalink / raw)
  To: ruby-core


Issue #6864 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to tadf (tadayoshi funaba)
Target version set to 2.0.0

This is caused by the following behavior.

  p Date.today <=> 1.0  #=> 1
  p 1.0 <=> Date.today  #=> nil

Funaba-san, what do you think?
It may be good to provide Date#coerce.

-- 
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864#change-32285

Author: slbug (Alex Grebennik)
Status: Assigned
Priority: Normal
Assignee: tadf (tadayoshi funaba)
Category: 
Target version: 2.0.0
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.



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

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

* [ruby-core:48795] [ruby-trunk - Bug #6864] bad value for range when using infinity with date or time
  2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
  2012-08-13 20:01 ` [ruby-core:47161] [ruby-trunk - Bug #6864] " slbug (Alex Grebennik)
  2012-11-03  3:47 ` [ruby-core:48793] [ruby-trunk - Bug #6864][Assigned] " mame (Yusuke Endoh)
@ 2012-11-03  4:38 ` tadf (tadayoshi funaba)
  2012-11-03 11:52 ` [ruby-core:48800] " mame (Yusuke Endoh)
  2019-08-15  1:52 ` [ruby-core:94363] [Ruby master Bug#6864] " merch-redmine
  4 siblings, 0 replies; 6+ messages in thread
From: tadf (tadayoshi funaba) @ 2012-11-03  4:38 UTC (permalink / raw)
  To: ruby-core


Issue #6864 has been updated by tadf (tadayoshi funaba).


this asymmetry is intentional.
i don't want to accept aNum + aDate.
Range's spec is variable.
----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864#change-32288

Author: slbug (Alex Grebennik)
Status: Assigned
Priority: Normal
Assignee: tadf (tadayoshi funaba)
Category: 
Target version: 2.0.0
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.



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

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

* [ruby-core:48800] [ruby-trunk - Bug #6864] bad value for range when using infinity with date or time
  2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
                   ` (2 preceding siblings ...)
  2012-11-03  4:38 ` [ruby-core:48795] [ruby-trunk - Bug #6864] " tadf (tadayoshi funaba)
@ 2012-11-03 11:52 ` mame (Yusuke Endoh)
  2019-08-15  1:52 ` [ruby-core:94363] [Ruby master Bug#6864] " merch-redmine
  4 siblings, 0 replies; 6+ messages in thread
From: mame (Yusuke Endoh) @ 2012-11-03 11:52 UTC (permalink / raw)
  To: ruby-core


Issue #6864 has been updated by mame (Yusuke Endoh).

Assignee changed from tadf (tadayoshi funaba) to matz (Yukihiro Matsumoto)
Target version changed from 2.0.0 to next minor

I see, thank you.  Then, addressing this issue requires
changing Range's spec, which is too heavy from this time.
I postpone this to next minor.

-- 
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864#change-32292

Author: slbug (Alex Grebennik)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: 
Target version: next minor
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.



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

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

* [ruby-core:94363] [Ruby master Bug#6864] bad value for range when using infinity with date or time
  2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
                   ` (3 preceding siblings ...)
  2012-11-03 11:52 ` [ruby-core:48800] " mame (Yusuke Endoh)
@ 2019-08-15  1:52 ` merch-redmine
  4 siblings, 0 replies; 6+ messages in thread
From: merch-redmine @ 2019-08-15  1:52 UTC (permalink / raw)
  To: ruby-core

Issue #6864 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Assigned to Closed

I think this issue is now solved by beginless and endless ranges.

----------------------------------------
Bug #6864: bad value for range when using infinity with date or time
https://bugs.ruby-lang.org/issues/6864#change-80773

* Author: slbug (Alex Grebennik)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 
* ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Steps to reproduce:

 require 'date'
 Range.new(Date.today, 1.0/0.0) # works
 Range.new(-1.0/0.0, Date.today) # fails
 Range.new(Time.now, 1.0/0.0) # fails
 Range.new(-1.0/0.0, Time.now) # fails

Tested on 1.9.3 and trunk. I think this is a bug, because there is no logic error. just ranges without one bound.




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

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

end of thread, other threads:[~2019-08-15  1:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-13 19:24 [ruby-core:47160] [ruby-trunk - Bug #6864][Open] bad value for range when using infinity with date or time slbug (Alex Grebennik)
2012-08-13 20:01 ` [ruby-core:47161] [ruby-trunk - Bug #6864] " slbug (Alex Grebennik)
2012-11-03  3:47 ` [ruby-core:48793] [ruby-trunk - Bug #6864][Assigned] " mame (Yusuke Endoh)
2012-11-03  4:38 ` [ruby-core:48795] [ruby-trunk - Bug #6864] " tadf (tadayoshi funaba)
2012-11-03 11:52 ` [ruby-core:48800] " mame (Yusuke Endoh)
2019-08-15  1:52 ` [ruby-core:94363] [Ruby master Bug#6864] " merch-redmine

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).