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.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
720
The send-pop optimisation
shyouhei
2
7.1k
Glitching Ruby Script
shyouhei
2
870
Being an Open Source Developer, at work
shyouhei
11
6.9k
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との付き合い方〜 / I've structured a study group plan using an app.
pauli
0
280
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
170
きのこカンファレンス2026_肩書きを外したとき私は誰か
yamasatimi
1
120
Hatena Engineer Seminar 37 jj1uzh
jj1uzh
0
410
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
360
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
7.9k
#エンジニアBooks 30分でわかる 「技術記事を書く技術」 / engineer-books 2026-06-30
jnchito
1
170
FinOps X 2026 Recap from Engineer Side #JapanFinOps
chacco38
0
240
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
1
960
Baseline対応のDOMの型定義を作った
uhyo
2
570
記録をかんたんに、提案をパーソナルに ── AIであすけんが目指すもの
oprstchn
0
110
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
230
Featured
See All Featured
Designing for Performance
lara
611
70k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
860
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
590
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
What's in a price? How to price your products and services
michaelherold
247
13k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Code Review Best Practice
trishagee
74
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
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