[#99115] [Ruby master Bug#17023] How to prevent String memory to be relocated in ruby-ffi — larskanis@...
Issue #17023 has been reported by larskanis (Lars Kanis).
22 messages
2020/07/10
[#99375] [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings — merch-redmine@...
Issue #17055 has been reported by jeremyevans0 (Jeremy Evans).
29 messages
2020/07/28
[#101207] [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings
— merch-redmine@...
2020/12/02
Issue #17055 has been updated by jeremyevans0 (Jeremy Evans).
[#101231] Re: [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings
— Austin Ziegler <halostatue@...>
2020/12/03
What does this mean?
[ruby-core:99345] [Ruby master Bug#16801] The default Struct constructor improperly handle keyword arguments
From:
nagachika00@...
Date:
2020-07-26 09:00:00 UTC
List:
ruby-core #99345
Issue #16801 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
ruby_2_7 61c6d433060881e952140d2154c06f8c9803dc8a.
----------------------------------------
Bug #16801: The default Struct constructor improperly handle keyword arguments
https://bugs.ruby-lang.org/issues/16801#change-86739
* Author: byroot (Jean Boussier)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.7.1p83
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
----------------------------------------
Reproduction script:
```ruby
Field = Struct.new(:value) do
def initialize(value, keyword: false)
super(value)
@keyword = keyword
end
end
Field.new(1, keyword: true)
```
```
/tmp/kw.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/tmp/kw.rb:2: warning: The called method `initialize' is defined here
```
This can be worked around with `keyword_init: true`, but I see no reason why `Struct` couldn't properly handle keyword arguments in it's default constructor.
I have a patch for this: https://github.com/ruby/ruby/pull/3045 however I had to modify a test that was explicitly expecting that warning, so maybe I'm missing something.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>