Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby 2.7クイズ / Ruby 2.7 Quiz
Search
Hiromichi NOMATA
May 26, 2020
Technology
1
400
Ruby 2.7クイズ / Ruby 2.7 Quiz
社内勉強会の資料
Hiromichi NOMATA
May 26, 2020
Tweet
Share
More Decks by Hiromichi NOMATA
See All by Hiromichi NOMATA
プロダクトと一緒に成長できるMVCフレームワークの使い方 / Adjustable MVC Framework
hiromichinomata
1
460
急にDX言い出した理由と真にDXを実現するために必要なこと / DX Explained
hiromichinomata
1
700
エボルタNEOくん三輪車で学ぶ動くペーパクラフトとバルーン / Evolta NEO Three Wheeled Cycle
hiromichinomata
1
650
ガンダムとザクの構造比較から見る動くガンダムを手に入れるために必要なこと / Gundam vs Zaku
hiromichinomata
1
640
投下資本に比例して成長できる開発組織体制について / How To Create Scalable Development Team
hiromichinomata
1
500
絵文字扇子の作り方 / How to create Emoji Sensu
hiromichinomata
1
630
クララと学ぶbash / Learn bash with Clara
hiromichinomata
2
46
クララと学ぶプログラミング / Learn Programming with Clara
hiromichinomata
1
130
Other Decks in Technology
See All in Technology
UDDのススメ - 拡張版 -
maguroalternative
1
590
工業高校で学習したとあるエンジニアのキャリアの話
shirayanagiryuji
0
110
Delegate authentication and a lot more to Keycloak with OpenID Connect
ahus1
0
220
はじめての転職講座/The Guide of First Career Change
kwappa
5
4.3k
Lambda management with ecspresso and Terraform
ijin
2
170
React Server ComponentsでAPI不要の開発体験
polidog
PRO
0
330
夏休みWebアプリパフォーマンス相談室/web-app-performance-on-radio
hachi_eiji
0
250
九州の人に知ってもらいたいGISスポット / gis spot in kyushu 2025
sakaik
0
180
Amazon GuardDuty での脅威検出:脅威検出の実例から学ぶ
kintotechdev
0
120
Claude Codeは仕様駆動の夢を見ない
gotalab555
23
6.9k
Claude CodeでKiroの仕様駆動開発を実現させるには...
gotalab555
3
1.1k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
6.3k
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
A better future with KSS
kneath
239
17k
Unsuck your backbone
ammeep
671
58k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
A designer walks into a library…
pauljervisheath
207
24k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Transcript
Ruby 2.7ΫΠζ @hiromichinomata
ύλʔϯϚον 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 ग़ྗ͞ΕΔจࣈ?
ύλʔϯϚον 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
irbʹՃ͞Εͨͷ? 1. ෳߦฤू 2. readline͕ෆཁʹ 3. ΫϥεɺϞδϡʔϧɺϝιουͷϦϑΝϨϯεΛͦͷ Ͱ֬ೝͰ͖ΔΑ͏ʹ 4. inspect݁Ռʹ৭͕ͭ͘Α͏ʹ
irbʹՃ͞Εͨͷ? 1. ෳߦฤू 2. readline͕ෆཁʹ 3. ΫϥεɺϞδϡʔϧɺϝιουͷϦϑΝϨϯεΛͦͷ Ͱ֬ೝͰ͖ΔΑ͏ʹ 4. inspect݁Ռʹ৭͕ͭ͘Α͏ʹ
͑: શ෦
ΩʔϫʔυҾͱͯ͠ڐ༰͞Ε Δͷ? 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})
ΩʔϫʔυҾͱͯ͠ڐ༰͞Ε Δͷ? 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}) =>
Ruby 2.7ΛίϯύΠϧ͢Δͷʹඞ ཁͳͷ? 1. C90 2. C99 3. C11 4.
C17
Ruby 2.7ΛίϯύΠϧ͢Δͷʹඞ ཁͳͷ? 1. C90 2. C99 3. C11 4.
C17
ิ: C99৽ػೳྫ * มએݴ͕ϒϩοΫͷઌ಄͚ͩͰͳ͍͍ͨ͘ ͱ͖ʹએݴՄೳʹ * forจͷΧϯλมΛࣄલʹએݴෆཁʹ
ूܭϝιου ["a", "b", "c", "b"].xxx #=> {"a"=>1, "b"=>2, "c"=>1} 1.
count_map 2. sum_map 3. pally 4. tally
ूܭϝιου ["a", "b", "c", "b"].xxx #=> {"a"=>1, "b"=>2, "c"=>1} 1.
count_map 2. sum_map 3. pally 4. tally
ิ • ӳޠͰtallyצఆɺूܭ͢Δͱ͍͏ҙຯ
൪߸ࢦఆύϥϝλʔ [1,4,3].map{puts xxx} # => 1 4 3 1. _0
2. _1 3. $0 4. $1
൪߸ࢦఆύϥϝλʔ 1. _0 2. _1 3. $0 4. $1 [1,4,3].map{puts
xxx} # => 1 4 3
ࢀߟ • https://www.ruby-lang.org/ja/news/ 2019/12/25/ruby-2-7-0-released/