From: Rolf Gebauer Date: 2006-10-25T01:05:10+09:00 Subject: Re: '**' as hash splat? 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