[#69616] [Ruby trunk - Feature #11258] add 'x' mode character for O_EXCL — cremno@...
Issue #11258 has been updated by cremno phobia.
3 messages
2015/06/16
[#69643] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — normalperson@...
Issue #11276 has been updated by Eric Wong.
3 messages
2015/06/17
[#69751] [Ruby trunk - Bug #11001] 2.2.1 Segmentation fault in reserve_stack() function. — kubo@...
Issue #11001 has been updated by Takehiro Kubo.
3 messages
2015/06/27
[ruby-core:69495] [Ruby trunk - Bug #11236] inconsistent behavior using ** vs hash as method parameter
From:
merch-redmine@...
Date:
2015-06-08 21:15:22 UTC
List:
ruby-core #69495
Issue #11236 has been updated by Jeremy Evans.
This is expected behavior, keyword argument hashes only support symbol keys, not hash keys. I suppose the error message could be better, though.
----------------------------------------
Bug #11236: inconsistent behavior using ** vs hash as method parameter
https://bugs.ruby-lang.org/issues/11236#change-52797
* Author: Aleksandar Kostadinov
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Using ruby 2.2.2 I see this work:
~~~
[18] pry(main)> def test(cmd, opts={})
[18] pry(main)* puts cmd,opts
[18] pry(main)* end
=> :test
[19] pry(main)> test(:ads, :d => 6, :f => :gah, {a:3,b:4} => 3)
ads
{:d=>6, :f=>:gah, {:a=>3, :b=>4}=>3}
=> nil
~~~
But this fails:
~~~
[2] pry(main)> def test(cmd, **opts)
[2] pry(main)* puts cmd, opts
[2] pry(main)* end
[9] pry(main)> test(:ads, :d => 6, :f => :gah, {a:3,b:4} => 3)
ArgumentError: wrong number of arguments (2 for 1)
from (pry):2:in `test'
~~~
--
https://bugs.ruby-lang.org/