Skip to content

More work on numeric API#8646

Merged
enebo merged 10 commits intojruby:10-devfrom
enebo:num_api
Mar 4, 2025
Merged

More work on numeric API#8646
enebo merged 10 commits intojruby:10-devfrom
enebo:num_api

Conversation

@enebo
Copy link
Member

@enebo enebo commented Feb 20, 2025

the foo2bar APIs (e.g. fix2num, long2num) have been almost entirely replaced with either:

  1. getValue() when we you type (RubyFixnum...)
  2. asLong(), asInt() when you know the type should convert other than range boundaries
  3. toLong(), toInt() when you are not sure if it can be including potentially doing coercion

the foo2bar APIs (e.g. fix2num, long2num) have been almost entirely
replaced with either:

  1. getValue() when we you type (RubyFixnum...)
  2. asLong(), asInt() when you know the type should convert other
     than range boundaries
  3. toLong(), toInt()  when you are not sure if it can be including
     potentially doing coercion
@enebo enebo added this to the JRuby 10.0.0.0 milestone Feb 20, 2025
@enebo enebo merged commit 2577188 into jruby:10-dev Mar 4, 2025
56 of 74 checks passed
@enebo enebo deleted the num_api branch March 4, 2025 18:29
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