pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jruby/jruby/pull/9149

ets.com/assets/global-0bd78641c0a1f3e0.css" /> *nil no longer calls nil.to_a, similar to how **nil does not call nil… by enebo · Pull Request #9149 · jruby/jruby · GitHub
Skip to content

*nil no longer calls nil.to_a, similar to how **nil does not call nil…#9149

Draft
enebo wants to merge 2 commits intojruby:10.1-devfrom
enebo:array_splat
Draft

*nil no longer calls nil.to_a, similar to how **nil does not call nil…#9149
enebo wants to merge 2 commits intojruby:10.1-devfrom
enebo:array_splat

Conversation

@enebo
Copy link
Copy Markdown
Member

@enebo enebo commented Dec 23, 2025

….to_hash

*nil no longer calls nil.to_a, similar to how **nil does not call nil.to_hash. [Feature #21047]

This could be optimized more but this matches semantics. The missing optimization is the parser(s) need to see literal nil and then set a new flag on build_splat marking that fact. Then the helper can use a cached empty frozen array. The bulk of the improvement is not dispatching so this will be a smaller percentage of improvement on a pretty uncommon case.

….to_hash

*nil no longer calls nil.to_a, similar to how **nil does not call nil.to_hash. [Feature #21047]

This could be optimized more but this matches semantics.  The missing optimization is the parser(s) need to see literal `nil` and then set a new
flag on build_splat marking that fact.  Then the helper can use a cached
empty frozen array.  The bulk of the improvement is not dispatching so this
will be a smaller percentage of improvement on a pretty uncommon case.
@enebo enebo added this to the JRuby 10.1.0.0 milestone Dec 23, 2025
@enebo
Copy link
Copy Markdown
Member Author

enebo commented Dec 23, 2025

Note: I updated Ruby version to 3.5.0 which is not the actual version. This was to match versioning currently used in ruby/spec to hit the specs updated for Ruby 4.0.0. I assume ruby/spec will update this soon and we can sync and change to proper version.

@headius
Copy link
Copy Markdown
Member

headius commented Dec 23, 2025

@enebo The version guards for 3.5 should still run if the version is 4.0. I think the specs have been updated but not synced yet.

@enebo
Copy link
Copy Markdown
Member Author

enebo commented Dec 23, 2025

@headius haha of course it should. I will update it to 4.0

@enebo enebo marked this pull request as draft December 23, 2025 18:30
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

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy