$30 off During Our Annual Pro Sale. View Details »
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
430
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
470
急にDX言い出した理由と真にDXを実現するために必要なこと / DX Explained
hiromichinomata
1
720
エボルタNEOくん三輪車で学ぶ動くペーパクラフトとバルーン / Evolta NEO Three Wheeled Cycle
hiromichinomata
1
710
ガンダムとザクの構造比較から見る動くガンダムを手に入れるために必要なこと / Gundam vs Zaku
hiromichinomata
1
690
投下資本に比例して成長できる開発組織体制について / How To Create Scalable Development Team
hiromichinomata
1
520
絵文字扇子の作り方 / How to create Emoji Sensu
hiromichinomata
1
670
クララと学ぶbash / Learn bash with Clara
hiromichinomata
2
58
クララと学ぶプログラミング / Learn Programming with Clara
hiromichinomata
1
140
Other Decks in Technology
See All in Technology
Debugging Edge AI on Zephyr and Lessons Learned
iotengineer22
0
140
生成AIでテスト設計はどこまでできる? 「テスト粒度」を操るテーラリング術
shota_kusaba
0
580
AWSセキュリティアップデートとAWSを育てる話
cmusudakeisuke
0
130
モダンデータスタック (MDS) の話とデータ分析が起こすビジネス変革
sutotakeshi
0
440
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
480
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
400
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
140
5分で知るMicrosoft Ignite
taiponrock
PRO
0
250
Kubernetes Multi-tenancy: Principles and Practices for Large Scale Internal Platforms
hhiroshell
0
120
品質のための共通認識
kakehashi
PRO
3
220
AI活用によるPRレビュー改善の歩み ― 社内全体に広がる学びと実践
lycorptech_jp
PRO
1
190
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
1.8k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
Building Applications with DynamoDB
mza
96
6.8k
RailsConf 2023
tenderlove
30
1.3k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
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/