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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
70
Microservices
linjunpop
0
97
Actor Model
linjunpop
0
43
Ruby for iOS developer
linjunpop
0
1k
A brief introduction to GitHub
linjunpop
1
75
Test Driven Development
linjunpop
0
59
Other Decks in Programming
See All in Programming
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
Event is what happens
moro
2
770
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
カツオ、ご期待ください
suneo3476
0
190
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
The agentic SEO stack - context over prompts
schlessera
0
970
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Un-Boring Meetings
codingconduct
0
460
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
A better future with KSS
kneath
240
18k
The Cost Of JavaScript in 2023
addyosmani
55
10k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Transcript
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