Skip to content

added type of Float::INFINITY - #1080

Closed
HoneyryderChuck wants to merge 1 commit into
ruby:masterfrom
HoneyryderChuck:infinity
Closed

added type of Float::INFINITY#1080
HoneyryderChuck wants to merge 1 commit into
ruby:masterfrom
HoneyryderChuck:infinity

Conversation

@HoneyryderChuck

Copy link
Copy Markdown
Contributor

No description provided.

@soutaro soutaro mentioned this pull request Aug 23, 2022
@soutaro

soutaro commented Aug 23, 2022

Copy link
Copy Markdown
Member

@HoneyryderChuck Thank you for opening this PR. 🙏 I opened another PR for this since this is not updated with CI failure.

@soutaro soutaro closed this Aug 23, 2022
@HoneyryderChuck
HoneyryderChuck deleted the infinity branch August 23, 2022 13:55
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.

2 participants