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
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
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
140
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.2k
Webhook best practices for rock solid and resilient deployments
glaforge
1
270
What happened to RubyGems and what can we learn?
mikemcquaid
0
250
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
360
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
670
今日から始めるAmazon Bedrock AgentCore
har1101
4
400
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
560
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
270
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
1.9k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
How to Ace a Technical Interview
jacobian
281
24k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
HDC tutorial
michielstock
1
360
Context Engineering - Making Every Token Count
addyosmani
9
650
KATA
mclloyd
PRO
34
15k
For a Future-Friendly Web
brad_frost
182
10k
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) }