[#116016] [Ruby master Bug#20150] Memory leak in grapheme clusters — "peterzhu2118 (Peter Zhu) via ruby-core" <ruby-core@...>
Issue #20150 has been reported by peterzhu2118 (Peter Zhu).
7 messages
2024/01/04
[#116382] [Ruby master Feature#20205] Enable `frozen_string_literal` by default — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #20205 has been reported by byroot (Jean Boussier).
77 messages
2024/01/23
[ruby-core:116517] [Ruby master Bug#20229] Empty keyword splat in array not removed in ARGSPUSH case
From:
"jeremyevans0 (Jeremy Evans) via ruby-core" <ruby-core@...>
Date:
2024-01-30 20:29:18 UTC
List:
ruby-core #116517
Issue #20229 has been updated by jeremyevans0 (Jeremy Evans).
I found that this bug was actually reported earlier in #20180, which I already have submitted a pull request to fix. I think we should use the approach in this pull request to fix this issue in master, as it is more efficient. We could backport the fix in #20180 to Ruby 3.1-3.3.
----------------------------------------
Bug #20229: Empty keyword splat in array not removed in ARGSPUSH case
https://bugs.ruby-lang.org/issues/20229#change-106536
* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
For the following code:
```ruby
a = []
kw = {}
[*a, **kw]
```
Ruby 2.0-3.3 return `[{}]`, when the desired result (since 2.7) is `[]`.
I discovered this while working on an optimization for the ARGSCAT case, where `[*a, 1, **kw]` allocates two arrays instead of a single array. My optimization fixes that by adding a `pushtoarraykwsplat` instruction as a replacement for `newarraykwsplat`. I've used `pushtoarraykwsplat` in the ARGSPUSH case to fix this bug.
My pull request for the bug fix and optimization: https://github.com/ruby/ruby/pull/9766
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/