Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ruby 2.5 What's New
Search
Urabe Shyouhei
November 29, 2017
Technology
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby 2.5 What's New
Urabe Shyouhei
November 29, 2017
More Decks by Urabe Shyouhei
See All by Urabe Shyouhei
On sending methods
shyouhei
0
740
The send-pop optimisation
shyouhei
2
7.2k
Glitching Ruby Script
shyouhei
2
890
Being an Open Source Developer, at work
shyouhei
11
7k
Optimizing Ruby
shyouhei
7
2.7k
Ruby and its evaluation
shyouhei
10
3.1k
Deeper look at RFC7159 the JSON
shyouhei
4
1.8k
What's New in Ruby 2.0
shyouhei
71
25k
Other Decks in Technology
See All in Technology
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
270
ひとりで始めた AI駆動開発、チームに広げて何が変わったのか
kenichiodo
1
170
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
140
キヨさん67歳 AIコーディングエージェント物語
happysamurai294
0
140
1週間、Opus封印でお願いします
kintotechdev
1
410
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
500
ALBのLCU予約とトラフィックの波によるプロダクト理解 / Understanding ALB LCU and Traffic Spikes
mito201
0
120
書き手が人でもAIでも正しくなる道、SREを埋め込んだDeveloper Platform / tech drivers day8
chmikata
4
860
AI時代のエンジニアの情報発信〜個人の発信を組織の力に変える〜
ryo_kawamata
0
5.9k
AI Search (Foundry IQ) におけるRAGデータの準備と配置
ryomaru0825
1
110
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
150
[General] 개발자로 해외 기업에서 일하기
skydoves
1
170
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Producing Creativity
orderedlist
PRO
348
41k
The agentic SEO stack - context over prompts
schlessera
0
990
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
What's in a price? How to price your products and services
michaelherold
247
13k
Code Review Best Practice
trishagee
74
20k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
960
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Tell your own story through comics
letsgokoyo
1
1.1k
エンジニアに許された特別な時間の終わり
watany
109
250k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
How to make the Groovebox
asonas
2
2.5k
Transcript
Urabe, Shyouhei Ruby 2.5 What’s New
·ͣ֓ܗ͔Β
EJ⒎TUBUT ˠ 1585 files changed, 147854 insertions(+), 72571 deletions(-) ˠ
1549 files changed, 120363 insertions(+), 70385 deletions(-) ˠ 2933 files changed, 103658 insertions(+), 62082 deletions(-) ˠ 2263 files changed, 82556 insertions(+), 289978 deletions(-) ˠUSVOL 7061 files changed, 360060 insertions(+), 34025 deletions(-)
None
None
bundler w ͍·ͷͱ͜Ζ͓ͦΒ͘࠷ޙͷඪ४ఴϥΠϒϥϦ w ͔ΒɺઃఆෆཁͰ͍͖ͳΓGemfileΛ ͋Ε ಡΉΑ͏ʹͳΔ
ଞϥΠϒϥϦ • Rubyspec • RDoc 6 (ripper integration) • ERb#result_with_hash
• SecureRandom.alphanumeric • Binding#irb • etc.
ERb#result_with_hash erb = ERb.new("<%= foo %>") erb.result_with_hash(foo: "1") # =>
"1"
SecureRandom.alphanumeric SecureRandom.alphanumeric(32) # => "Xr3GCd3y2wkUgEF9lSh5pD2s5NDpeHSM"
Binding#irb def foo while true do raise unless rand <
0.5 end rescue binding.irb # <= end
ίΞΫϥε • String#delete_prefix / String#delete_suffix • Array#append / Array#prepend •
Dir#children / Dir#each_child • Hash#transform_keys • Kernel#yield_self
String#delete_prefix "log.fluentd.message {...".delete_prefix("log.") # => "fluentd.message {..."
Array#append %w'dolor sit amet'.prepend(%w'lorem ipsum') # => [["lorem", "ipsum"], "dolor",
"sit", "amet"] %w'dolor sit amet'.prepend('lorem', 'ipsum') # => ["lorem", "ipsum", "dolor", "sit", "amet"]
Hash#transform_keys {foo: 'bar'}.transform_keys(&:to_s) # => {"foo"=>"bar"}
Kernel#yield_self {foo: 'bar'}.yield_self {|i| JSON.dump(i) } # => "{\"foo\":\"bar\"}"
จ๏ͱ͔ • do … rescue … end • Toplevel constant
lookup removal • Reverse backtrace order
do … rescue … end 128.times do |i| raise unless
rand < 0.5 rescue RuntimeError puts $! end
Reverse backtrace zsh % ruby -e 'def foo; bar; end'
-e 'def bar; raise; end' -e 'foo' Traceback (most recent call last): 2: from -e:3:in `<main>' 1: from -e:1:in `foo' -e:2:in `bar': unhandled exception [1] 34131 exit 1 ruby -e ‘…’ zsh % ruby -e 'def foo; bar; end' -e 'def bar; raise; end' -e 'foo' 2>&1 | cat -e:2:in `bar': unhandled exception from -e:1:in `foo' from -e:3:in `<main>' [1] 34291 exit 1 ruby -e ‘…’ 2>&1 | 34292 done cat