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
ishikawa ryu
April 19, 2018
Technology
0
50
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
0
35
2021_11_internal_tech_session__lxd
vsanna2
0
130
AnyPay 社内エンジニアLT オフレコmeetup vol1
vsanna2
0
370
Rails5.1.4 overview
vsanna2
0
96
React Native Router Flux v4 introduction
vsanna2
1
140
Other Decks in Technology
See All in Technology
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
5
4.1k
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
240
怖くない!はじめてのClaude Code
shinya337
0
160
5min GuardDuty Extended Threat Detection EKS
takakuni
0
160
2025-06-26 GitHub CopilotとAI駆動開発:実践と導入のリアル
fl_kawachi
1
100
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
4
570
ドメイン特化なCLIPモデルとデータセットの紹介
tattaka
1
200
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
190
"サービスチーム" での技術選定 / Making Technology Decisions for the Service Team
kaminashi
1
190
Javaで作る RAGを活用した Q&Aアプリケーション
recruitengineers
PRO
1
130
GitHub Copilot の概要
tomokusaba
1
140
rubygem開発で鍛える設計力
joker1007
2
220
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
How GitHub (no longer) Works
holman
314
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
BBQ
matthewcrist
89
9.7k
Fireside Chat
paigeccino
37
3.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
Facilitating Awesome Meetings
lara
54
6.4k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
The Invisible Side of Design
smashingmag
300
51k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
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) }