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
Ruby2.5.0 overview
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ishikawa ryu
April 19, 2018
Technology
0
53
Ruby2.5.0 overview
Ruby2.5.0のリリースを目前に控え、変更点をLT用にまとめ共有した。
ishikawa ryu
April 19, 2018
Tweet
Share
More Decks by ishikawa ryu
See All by ishikawa ryu
SmartNewsにおける 1000+ノード規模 K8s基盤 でのコスト最適化 – Spot・Gravitonの大規模導入への挑戦
vsanna2
1
300
2021_11_internal_tech_session__lxd
vsanna2
0
150
AnyPay 社内エンジニアLT オフレコmeetup vol1
vsanna2
0
380
Rails5.1.4 overview
vsanna2
0
100
React Native Router Flux v4 introduction
vsanna2
1
140
Other Decks in Technology
See All in Technology
フロントエンド開発者のための「厄払い」
optim
0
170
Werner Vogelsが14年間 問い続けてきたこと
yusukeshimizu
2
240
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
230
AI時代にあわせたQA組織戦略
masamiyajiri
6
2.8k
20260120 Amazon VPC のパブリックサブネットを無くしたい!
masaruogura
2
170
Claude in Chromeで始める自律的フロントエンド開発
diggymo
1
280
GitHub Copilot CLI 現状確認会議
torumakabe
12
4.9k
Azure SRE Agent x PagerDutyによる近未来インシデント対応への期待 / The Future of Incident Response: Azure SRE Agent x PagerDuty
aeonpeople
0
210
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
41k
しろおびセキュリティへ ようこそ
log0417
0
130
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
600
Agentic Coding 実践ワークショップ
watany
41
27k
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Claude Code のすすめ
schroneko
67
210k
How to build a perfect <img>
jonoalderson
1
4.9k
エンジニアに許された特別な時間の終わり
watany
106
230k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Marketing to machines
jonoalderson
1
4.6k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
180
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
220
Transcript
3VCZ Ξοϓσʔτɻ
3VCZ Ξοϓσʔτ 3ZV *4)*,"8"
3VCZͷϦϦʔε
3VCZͷϦϦʔε
3VCZͷϦϦʔε 3VCZ ʜ 3VCZ 3VCZ 3VCZ 3VCZ 3VCZ 3VCZ ༧ఆ
3VCZ3FMFBTFTcIUUQTXXXSVCZMBOHPSHFOEPXOMPBETSFMFBTFT
5SZJU cd path/to/sandbox && mkdir locale wget https://cache.ruby-lang.org/pub/ruby/2.5/ ruby-2.5.0-preview1.tar.gz tar
xvzf https://cache.ruby-lang.org/pub/ruby/2.5/ ruby-2.5.0-preview1.tar.gz cd ruby-2.5.0-preview1 ./configure —prefix=/path/to/sandbox/local make sudo make install cd ../local ./bin/ruby -v #=> 2.5.0preview1
ओͳมߋ SVCZ/&84BUW@@@QSFWJFXuSVCZSVCZcIUUQTHJUIVCDPNSVCZSVCZCMPCW@@@QSFWJFX/&84
ओͳมߋ SVCZ/&84BUW@@@QSFWJFXuSVCZSVCZcIUUQTHJUIVCDPNSVCZSVCZCMPCW@@@QSFWJFX/&84 ͋ͱͰΑΉ
,FSOFMZJFME@TFMG # ҾʹࣗࣗΛͱΓɺϒϩοΫҾΛฦΓͱ͢Δ(mapͬΆ͍) 2.yield_self { |n| n * 10 }
#=> 20 # tapϒϩοΫͷதΛฦ͢Θ͚Ͱͳ͍ 2.tap { |n| n * 10 } #=> 2 # ϨγʔόͦͷͷΛtapͰॻ͖͑ΔΑ͏ͳॲཧಉ݁͡ՌʹͳΔ [].tap { |arr| arr << 1 << 2 << 3 } [].yield_self { |arr| arr << 1 << 2 << 3 }
,FSOFMZJFME@TFMG require 'rest-client' require 'uri' require 'json' payment_id = 'hogehoge'
endpoint = URI::Generic.build( # 1. endpointͷ࡞ scheme: 'http', # host: 'api.example.com', # path: "/api/v1/payments/#{payment_id}", # port: 3000 # ).to_s # response = RestClient.get(endpoint) # 2. ϦΫΤετ͛Δ response_body = JSON.parse(response.body) # 3. ϨεϙϯεΛjsonͱͯ͠ղऍ͢Δ # puts response_body #=> { version: "1.0.0", response: { message: "..." } }
,FSOFMZJFME@TFMG require 'rest-client' require 'uri' require 'json' payment_id = 'hogehoge'
response_body = URI::Generic.build( # 1. endpointͷ࡞ scheme: 'http', # host: 'api.example.com', # path: "/api/v1/payments/#{payment_id}", # port: 3000 # ).to_s # .yield_self { |endpoint| RestClient.get(endpoint) } # 2. ϦΫΤετ͛Δ .yield_self { |response| JSON.parse(response.body) } # 3. ղऍ͢Δ # puts response_body #=> { version: "1.0.0", response: { message: "..." } }
,FSOFMZJFME@TFMG res = RestClient.get("/users/current") user = JSON.parse(res.body) user_id = user['id']
res = RestClient.get("/users/#{user_id}/friends") friends = JSON.parse(res.body) f_id = friends.last['id'] res = RestClient.get("/users/#{f_id}/profile") profile = JSON.parse(res.body)
,FSOFMZJFME@TFMG profile = RestClient.get("/users/current") .yield_self { |res| JSON.parse(res.body) } .yield_self
{ |user| user['id'] } .yield_self { |user_id| RestClient.get("/users/#{user_id}/ friends") } .yield_self { |res| JSON.parse(res.body) } .yield_self { |friends| friends.last['id'] } .yield_self { |f_id| RestClient.get(“/users/#{f_id}/ profile”) } .yield_self { |res| JSON.parse(res.body) }