[#70252] Re: [ruby-cvs:58640] nobu:r51492 (trunk): node.c: NODE_ALLOCA for ALLOCV — Eric Wong <normalperson@...>
Besides possible backwards compatibility, can we drop volatile
3 messages
2015/08/05
[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...
Issue #11420 has been reported by Koichi Sasada.
11 messages
2015/08/06
[#70337] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/11
Nice. Thank you guys for looking into this.
[#70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
Btw, did you consider using flexible array to avoid extra malloc
[#70355] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Юрий Соколов <funny.falcon@...>
2015/08/12
I thought to suggest to embed hash_id_table directly into places when it is
[#70356] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— SASADA Koichi <ko1@...>
2015/08/12
On 2015/08/13 4:29, Юрий Соколов wrote:
[#70358] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
SASADA Koichi <ko1@atdot.net> wrote:
[#70509] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — ko1@...
Issue #11276 has been updated by Koichi Sasada.
3 messages
2015/08/21
[#70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields — Daniel Doubrovkine <dblock@...>
(this is my first time e-mailing list list, so apologies for any misstep :)
4 messages
2015/08/31
[ruby-core:70315] [Ruby trunk - Bug #11382] Keyword arguments randomly nullified
From:
milovan.zogovic@...
Date:
2015-08-10 16:55:29 UTC
List:
ruby-core #70315
Issue #11382 has been updated by Milovan Zogovic.
I've tried with 2.2.0-dev and it worked. Thanks!
----------------------------------------
Bug #11382: Keyword arguments randomly nullified
https://bugs.ruby-lang.org/issues/11382#change-53737
* Author: Milovan Zogovic
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: 2.2.2
* Backport:
----------------------------------------
Here is the example:
~~~
class Parent
def initialize(a: nil, b: nil, **properties)
puts("parent: { a: #{a.inspect}, b: #{b.inspect}, properties: #{properties}")
end
end
class Child < Parent
def initialize(args={})
puts("child: #{args}")
super
end
end
require "yaml"
Child.new(a: "A", **YAML.load("---\n:b: B\n:x: X")) # ok
Child.new(a: "A", **YAML.load("---\n:b: B\n:xx: XX")) # bug: ":a" gets nullified
~~~
The output is:
~~~
child: {:a=>"A", :b=>"B", :x=>"X"}
parent: { a: "A", b: "B", properties: {:x=>"X"}
child: {:a=>"A", :b=>"B", :xx=>"XX"}
parent: { a: "A", b: nil, properties: {:xx=>"XX"}
~~~
The only difference between first and second example is that the second one uses :xx as extra argument, while the first one uses :x.
The bug will appear randomly based on the argument name.
Also, this only happens when when the arguments are loaded from somewhere else (e.g. YAML.load).
If i put `{ b: "B", xx: "XX" }` just anywhere in the code, the bug won't happen, which is extra weird.
It works with ruby 2.1, and 2.0.
--
https://bugs.ruby-lang.org/