Actions
Bug #16371
closedInconsistent usage of Double splat operator
    Bug #16371:
    Inconsistent usage of Double splat operator
  
Description
Here is an issue with a weird behavior of ruby double splat operator:
a = {a: 'a'}
b = {'b' => 'b'}
{x: 'x', **a}
#=> {:x=>"x", :a=>"a"}
{x: 'x', **b}
#=> TypeError (hash key "b" is not a Symbol)
When I do that implicitly, it works:
{x: 'x', **{'b' => 'b'}} 
#=> {:x=>"x", "b"=>"b"}
At the same time:
{**{'b' => 'b'}}
# TypeError (hash key "b" is not a Symbol)
From my point of view, it definitely works inconsistently.
Could you help with this example or give an advice? (maybe I used it incorrectly?)
Actions