Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
480
急にDX言い出した理由と真にDXを実現するために必要なこと / DX Explained
hiromichinomata
1
720
エボルタNEOくん三輪車で学ぶ動くペーパクラフトとバルーン / Evolta NEO Three Wheeled Cycle
hiromichinomata
1
710
ガンダムとザクの構造比較から見る動くガンダムを手に入れるために必要なこと / Gundam vs Zaku
hiromichinomata
1
700
投下資本に比例して成長できる開発組織体制について / How To Create Scalable Development Team
hiromichinomata
1
520
絵文字扇子の作り方 / How to create Emoji Sensu
hiromichinomata
1
670
クララと学ぶbash / Learn bash with Clara
hiromichinomata
2
60
クララと学ぶプログラミング / Learn Programming with Clara
hiromichinomata
1
140
Other Decks in Technology
See All in Technology
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
110
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.4k
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
620
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
430
SREが取り組むデプロイ高速化 ─ Docker Buildを最適化した話
capytan
0
130
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
300
Kiro を用いたペアプロのススメ
taikis
4
1.6k
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
200
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1k
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
360
特別捜査官等研修会
nomizone
0
540
Featured
See All Featured
How to make the Groovebox
asonas
2
1.8k
How to build a perfect <img>
jonoalderson
0
4.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
180
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
41
GraphQLとの向き合い方2022年版
quramy
50
14k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Designing for Timeless Needs
cassininazir
0
91
Side Projects
sachag
455
43k
KATA
mclloyd
PRO
33
15k
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/