Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby 2.7クイズ / Ruby 2.7 Quiz

Ruby 2.7クイズ / Ruby 2.7 Quiz

社内勉強会の資料

Hiromichi NOMATA

May 26, 2020
Tweet

More Decks by Hiromichi NOMATA

Other Decks in Technology

Transcript

  1. ύλʔϯϚον case {a: 0, b: 1, c: 2} in {a:

    0, i: 1} puts 1 in {a: 0, b: tmp} puts 2 in {a: 0, b: 1, c: tmp} puts 3 in {a: 0, b: 1, c: 2} puts 4 end ग़ྗ͞ΕΔจࣈ͸?
  2. ύλʔϯϚον case {a: 0, b: 1, c: 2} in {a:

    0, i: 1} puts 1 in {a: 0, b: tmp} puts 2 in {a: 0, b: 1, c: tmp} puts 3 in {a: 0, b: 1, c: 2} puts 4 end ౴͑: 2
  3. ΩʔϫʔυҾ਺ͱͯ͠ڐ༰͞Ε Δͷ͸? 1. def foo(h, **kw); end; foo(key: 42) 2.

    def foo(h, key: 42); end; foo(key: 42) 3. def foo(**kw); end; foo({key: 42}) 4. def foo(h, key: 42); end; foo({key: 42})
  4. ΩʔϫʔυҾ਺ͱͯ͠ڐ༰͞Ε Δͷ͸? 1. def foo(h, **kw); end; foo(key: 42) 2.

    def foo(h, key: 42); end; foo(key: 42) 3. def foo(**kw); end; foo({key: 42}) 4. def foo(h, key: 42); end; foo({key: 42}) =>