ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:91021] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
       [not found] <redmine.issue-15525.20190111141641@ruby-lang.org>
@ 2019-01-11 14:16 ` ibylich
  2019-01-11 14:32 ` [ruby-core:91022] " eregontp
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: ibylich @ 2019-01-11 14:16 UTC (permalink / raw)
  To: ruby-core

Issue #15525 has been reported by ibylich (Ilya Bylich).

----------------------------------------
Bug #15525: Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
https://bugs.ruby-lang.org/issues/15525

* Author: ibylich (Ilya Bylich)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Each line below raises an error
~~~
Complex(:sym, 0, exception: false) # TypeError (not a real)
Complex(nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(0, nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(nil, 0, exception: false) # TypeError (can't convert nil into Complex)

Rational(nil, exception: false) # TypeError (can't convert nil into Rational)
Rational(nil, nil, exception: false) # TypeError (can't convert nil into Rational)
~~~

Looks like a bug, `Integer(nil, exception: false)` and `Float(nil, exception: false)` are not affected, both return `nil`

Also `Integer(arg, exception: false)` raises an error for:
~~~
Integer(Float::NAN, exception: false) # FloatDomainError (NaN)
Integer(Float::INFINITY, exception: false) # FloatDomainError (Infinity)
Integer(-Float::INFINITY, exception: false) # FloatDomainError (-Infinity)
~~~




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

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

* [ruby-core:91022] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
       [not found] <redmine.issue-15525.20190111141641@ruby-lang.org>
  2019-01-11 14:16 ` [ruby-core:91021] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error ibylich
@ 2019-01-11 14:32 ` eregontp
  2019-01-12  5:03 ` [ruby-core:91033] [Ruby trunk Bug#15525][Closed] " nobu
  2019-01-18  4:19 ` [ruby-core:91158] [Ruby trunk Bug#15525] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: eregontp @ 2019-01-11 14:32 UTC (permalink / raw)
  To: ruby-core

Issue #15525 has been updated by Eregon (Benoit Daloze).


Found by specs added in https://github.com/ruby/spec/pull/648

----------------------------------------
Bug #15525: Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
https://bugs.ruby-lang.org/issues/15525#change-76246

* Author: ibylich (Ilya Bylich)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Each line below raises an error
~~~
Complex(:sym, 0, exception: false) # TypeError (not a real)
Complex(nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(0, nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(nil, 0, exception: false) # TypeError (can't convert nil into Complex)

Rational(nil, exception: false) # TypeError (can't convert nil into Rational)
Rational(nil, nil, exception: false) # TypeError (can't convert nil into Rational)
~~~

Looks like a bug, `Integer(nil, exception: false)` and `Float(nil, exception: false)` are not affected, both return `nil`

Also `Integer(arg, exception: false)` raises an error for:
~~~
Integer(Float::NAN, exception: false) # FloatDomainError (NaN)
Integer(Float::INFINITY, exception: false) # FloatDomainError (Infinity)
Integer(-Float::INFINITY, exception: false) # FloatDomainError (-Infinity)
~~~




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

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

* [ruby-core:91033] [Ruby trunk Bug#15525][Closed] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
       [not found] <redmine.issue-15525.20190111141641@ruby-lang.org>
  2019-01-11 14:16 ` [ruby-core:91021] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error ibylich
  2019-01-11 14:32 ` [ruby-core:91022] " eregontp
@ 2019-01-12  5:03 ` nobu
  2019-01-18  4:19 ` [ruby-core:91158] [Ruby trunk Bug#15525] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2019-01-12  5:03 UTC (permalink / raw)
  To: ruby-core

Issue #15525 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Closed

Applied in changeset trunk|r66796.

----------
No TypeError at nil if exception: false

[ruby-core:91021] [Bug #15525]

----------------------------------------
Bug #15525: Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
https://bugs.ruby-lang.org/issues/15525#change-76254

* Author: ibylich (Ilya Bylich)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Each line below raises an error
~~~
Complex(:sym, 0, exception: false) # TypeError (not a real)
Complex(nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(0, nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(nil, 0, exception: false) # TypeError (can't convert nil into Complex)

Rational(nil, exception: false) # TypeError (can't convert nil into Rational)
Rational(nil, nil, exception: false) # TypeError (can't convert nil into Rational)
~~~

Looks like a bug, `Integer(nil, exception: false)` and `Float(nil, exception: false)` are not affected, both return `nil`

Also `Integer(arg, exception: false)` raises an error for:
~~~
Integer(Float::NAN, exception: false) # FloatDomainError (NaN)
Integer(Float::INFINITY, exception: false) # FloatDomainError (Infinity)
Integer(-Float::INFINITY, exception: false) # FloatDomainError (-Infinity)
~~~




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

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

* [ruby-core:91158] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
       [not found] <redmine.issue-15525.20190111141641@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-12  5:03 ` [ruby-core:91033] [Ruby trunk Bug#15525][Closed] " nobu
@ 2019-01-18  4:19 ` naruse
  3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2019-01-18  4:19 UTC (permalink / raw)
  To: ruby-core

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

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

ruby_2_6 r66862 merged revision(s) 66796,66797.

----------------------------------------
Bug #15525: Complex(nil, exception: false) and Rational(nil, exception: false) raises an error
https://bugs.ruby-lang.org/issues/15525#change-76389

* Author: ibylich (Ilya Bylich)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE
----------------------------------------
Each line below raises an error
~~~
Complex(:sym, 0, exception: false) # TypeError (not a real)
Complex(nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(0, nil, exception: false) # TypeError (can't convert nil into Complex)
Complex(nil, 0, exception: false) # TypeError (can't convert nil into Complex)

Rational(nil, exception: false) # TypeError (can't convert nil into Rational)
Rational(nil, nil, exception: false) # TypeError (can't convert nil into Rational)
~~~

Looks like a bug, `Integer(nil, exception: false)` and `Float(nil, exception: false)` are not affected, both return `nil`

Also `Integer(arg, exception: false)` raises an error for:
~~~
Integer(Float::NAN, exception: false) # FloatDomainError (NaN)
Integer(Float::INFINITY, exception: false) # FloatDomainError (Infinity)
Integer(-Float::INFINITY, exception: false) # FloatDomainError (-Infinity)
~~~




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

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

end of thread, other threads:[~2019-01-18  4:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15525.20190111141641@ruby-lang.org>
2019-01-11 14:16 ` [ruby-core:91021] [Ruby trunk Bug#15525] Complex(nil, exception: false) and Rational(nil, exception: false) raises an error ibylich
2019-01-11 14:32 ` [ruby-core:91022] " eregontp
2019-01-12  5:03 ` [ruby-core:91033] [Ruby trunk Bug#15525][Closed] " nobu
2019-01-18  4:19 ` [ruby-core:91158] [Ruby trunk Bug#15525] " 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).