Trans schrieb:

> We can:
>
>   a = [2,1]
>   [3,*a]  #=> [3,2,1]
>
> How about:
>
>   h = {:b=>2, :a=>1}
>   {:c => 3, **h}  #=> {:c=>3, :b=>2, :a=>1}
>
> T.
we can do by using method Hash::[] instead of literal {}

Hash[ :c, 3, *h ]  # => {:c=>3, [:a, 1]=>[:b, 2]}
 

Rolf