Skip to content

Add Float::Infinity - #1095

Merged
soutaro merged 1 commit into
masterfrom
float-infinity
Aug 23, 2022
Merged

Add Float::Infinity#1095
soutaro merged 1 commit into
masterfrom
float-infinity

Conversation

@soutaro

@soutaro soutaro commented Aug 23, 2022

Copy link
Copy Markdown
Member

Closes #1080

@soutaro
soutaro enabled auto-merge August 23, 2022 12:48
@soutaro
soutaro merged commit 05406d7 into master Aug 23, 2022
@soutaro
soutaro deleted the float-infinity branch August 23, 2022 12:49
soutaro pushed a commit that referenced this pull request Jul 27, 2026
Both are declared in core/float.rbs but raise NameError at runtime:

* Float::ROUNDS was removed from Ruby in 3.0 (ruby/ruby#2953).
* Float::Infinity was added in #1095 (which superseded #1080). Ruby does
  not define this constant: looking at the Ruby of that period (3.1),
  numeric.c defines Float::INFINITY but not Float::Infinity, and it still
  raises NameError today.

Also add singleton constant type assertions for the remaining Float
constants, so their declared types stay verified against the runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant