8000 YJIT: Move Integer#downto, Array#select, and Array#map to Ruby by k0kubun · Pull Request #12074 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

YJIT: Move Integer#downto, Array#select, and Array#map to Ruby #12074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a comment about Integer#downto Enumerator
  • Loading branch information
k0kubun committed Nov 13, 2024
commit 300891fce49752130cfc57c7fded7356e0ee2ccd
2 changes: 2 additions & 0 deletions numeric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ def denominator
def downto(to) # :nodoc:
Primitive.attr! :inline_block, :c_trace

# When no block is given, return an Enumerator that enumerates from `self` to `to`.
# Not using `block_defined?` and `to_enum` to keep them unaffected by redefinitions.
unless defined?(yield)
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 1, &to, int_downto_size)'
end
Expand Down
0