■ [ruby] Rubyの意外な機能とか いま「プログラミングRuby」を読んでるんだけど、知らんかったことが多いなー。 4274066428 多重代入は括弧でグルーピングできる irb(main):010:0> b, (c, d), e = [1, [2, 3], 4] => [1, [2, 3], 4] irb(main):011:0> [b, c, d, e] => [1, 2, 3, 4] destructuring-bindっぽい。 notが警告を出すことがある irb(main):012:0> not "foo" (irb):12: warning: string literal in condition => false irb(main):013:0> not /foo/ (irb):13: warning: regex literal in condition => t
![Rubyの意外な機能とか](https://cdn-ak-scissors.b.st-hatena.com/image/square/b0dd2a08b2c0fff30d70543ed7fa340ebfeb5697/height=288;version=1;width=512/https%3A%2F%2Froute477.net%2Fd%2Fassets%2Fogimage.png)