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.0
Search
Jun Lin
November 27, 2012
Programming
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby 2.0
A glance of Ruby 2.0
Jun Lin
November 27, 2012
Transcript
24 slides
Ruby 2.0
February 24th 2013
Ruby’s 20th birthday.
Faster
Reliable
More fun to use
REFINEMENTS
• A mechanism to extend Classes and Modules locally •
Lexically scoped • Safer and cleaner than open-class monkey patching
• Module#refine • Kernel#using
module Foo refine String do def say "Yoho, #{self}!" end
end end class Bar using Foo def aloha 'Bar'.say end end
Bar.new.aloha => “Yoho, Bar!”
PREPEND
Module#prepend
class A def foo 'foo' end end module B def
foo super + 'bar' end end class C < A prepend B def foo super + 'COOL' end end
C.new.foo => “fooCOOLbar”
LAZY
Enumerator#lazy
(1..Float::INFINITY).lazy.select(&:even?).take(20).force
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20,
22, 24, 26, 28, 30, 32, 34, 36, 38, 40]
KEYWORD ARGUMENT
class Bar def foo(a: "foo", b: 424242) [a, b] end
end
Bar.new.foo => ['foo', 424242]
2.0.0-preview1
END
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
72
Microservices
linjunpop
0
98
Actor Model
linjunpop
0
45
Ruby for iOS developer
linjunpop
0
1k
A brief introduction to GitHub
linjunpop
1
75
Test Driven Development
linjunpop
0
60
Other Decks in Programming
See All in Programming
Canvas 2D Context Next
petamoriken
0
210
LLM 101
dalinaum
0
540
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
310
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
390
Spec-driven Development with AI
simas
PRO
0
2.3k
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
340
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
450
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
270
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
250
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
The browser strikes back
jonoalderson
0
2k
Well, that’s weird…
csswizardry
3
240
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Scaling GitHub
holman
464
140k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
970
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Deep Space Network (abreviated)
tonyrice
0
430
The SEO identity crisis: Don't let AI make you average
varn
0
630
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k