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
250
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
330
急にDX言い出した理由と真にDXを実現するために必要なこと / DX Explained
hiromichinomata
1
510
エボルタNEOくん三輪車で学ぶ動くペーパクラフトとバルーン / Evolta NEO Three Wheeled Cycle
hiromichinomata
1
330
ガンダムとザクの構造比較から見る動くガンダムを手に入れるために必要なこと / Gundam vs Zaku
hiromichinomata
1
320
投下資本に比例して成長できる開発組織体制について / How To Create Scalable Development Team
hiromichinomata
1
380
絵文字扇子の作り方 / How to create Emoji Sensu
hiromichinomata
1
380
クララと学ぶbash / Learn bash with Clara
hiromichinomata
1
27
クララと学ぶプログラミング / Learn Programming with Clara
hiromichinomata
1
75
Other Decks in Technology
See All in Technology
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
0
150
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
140
DevOpsDays History and my DevOps story
kawaguti
PRO
9
2.4k
レガシーをぶっ壊せ。AEONで始めるDevRelの話 / Qiita Night 2024-2-22
aeonpeople
3
1.3k
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
4
4.7k
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
610
生産性向上チームの紹介
cybozuinsideout
PRO
1
860
On Your Data を超えていく!
hirotomotaguchi
2
650
どうするコスト最適化のトレードオフ
tetsuyaooooo
1
490
日本におけるデータエンジニアリングのこれまでとこれから
foursue
16
4.2k
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
1
6.8k
ServiceNow Knowledge Learning Rise up
manarobot
0
200
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
225
17k
Building Adaptive Systems
keathley
31
1.9k
How STYLIGHT went responsive
nonsquared
92
4.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Product Roadmaps are Hard
iamctodd
44
9.7k
Designing for Performance
lara
601
67k
Scaling GitHub
holman
457
140k
The Mythical Team-Month
searls
216
42k
Documentation Writing (for coders)
carmenintech
60
3.9k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
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/