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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
710
The send-pop optimisation
shyouhei
2
7.1k
Glitching Ruby Script
shyouhei
2
860
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
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.8k
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.8k
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
140
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
個人の発見を、組織の知恵に 〜生成AI活用を"探索"から"組織の仕組み"へ〜
kintotechdev
3
1.1k
新しいVibe Codingと”自走”について
watany
5
270
LLMにもCAP定理があるという話
harukasakihara
0
280
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
330
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
2
320
Rancherの紹介&Update情報(RancherJP Online Meetup #09)
yoshiyuki_kono
0
140
AAIFに入ってみた ~内から見えるコミュニティ動向~
sato4
0
100
作って終わりにしない タイミーのセマンティックレイヤー育成の現在地
chanyou0311
3
1.9k
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.7k
Accessibility Awareness
sabderemane
1
130
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
580
Embracing the Ebb and Flow
colly
88
5.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
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