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
390
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
450
急にDX言い出した理由と真にDXを実現するために必要なこと / DX Explained
hiromichinomata
1
690
エボルタNEOくん三輪車で学ぶ動くペーパクラフトとバルーン / Evolta NEO Three Wheeled Cycle
hiromichinomata
1
620
ガンダムとザクの構造比較から見る動くガンダムを手に入れるために必要なこと / Gundam vs Zaku
hiromichinomata
1
610
投下資本に比例して成長できる開発組織体制について / How To Create Scalable Development Team
hiromichinomata
1
490
絵文字扇子の作り方 / How to create Emoji Sensu
hiromichinomata
1
610
クララと学ぶbash / Learn bash with Clara
hiromichinomata
2
41
クララと学ぶプログラミング / Learn Programming with Clara
hiromichinomata
1
120
Other Decks in Technology
See All in Technology
「良さそう」と「とても良い」の間には 「良さそうだがホンマか」がたくさんある / 2025.07.01 LLM品質Night
smiyawaki0820
1
260
Kotlin Coroutine Mechanisms: A Surprisingly Deep Rabbithole
amanda_hinchman
2
100
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
340
ドメイン特化なCLIPモデルとデータセットの紹介
tattaka
0
160
Snowflake Summit 2025 データエンジニアリング関連新機能紹介 / Snowflake Summit 2025 What's New about Data Engineering
tiltmax3
0
320
生成AI時代 文字コードを学ぶ意義を見出せるか?
hrsued
1
590
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
240
"サービスチーム" での技術選定 / Making Technology Decisions for the Service Team
kaminashi
1
170
Node-RED × MCP 勉強会 vol.1
1ftseabass
PRO
0
160
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
190
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
200
生成AIで小説を書くためにプロンプトの制約や原則について学ぶ / prompt-engineering-for-ai-fiction
nwiizo
4
2.4k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
GitHub's CSS Performance
jonrohan
1031
460k
Designing Experiences People Love
moore
142
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
A Tale of Four Properties
chriscoyier
160
23k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
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/