0
0

More than 1 year has passed since last update.

ruby で Array から Hash を作りたい

Last updated at Posted at 2012-09-15
ruby
> [1,2].instance_eval{|a,b| {:a => a, :b => b}} 
=> {:a => 1, :b => 2}

こういうことをもっとシンプルに書く方法だれか教えてください。

0
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0