Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby 2.0
Search
Jun Lin
November 27, 2012
Programming
1
170
Ruby 2.0
A glance of Ruby 2.0
Jun Lin
November 27, 2012
Tweet
Share
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
53
Microservices
linjunpop
0
65
Actor Model
linjunpop
0
30
Ruby for iOS developer
linjunpop
0
1k
A brief introduction to GitHub
linjunpop
1
67
Test Driven Development
linjunpop
0
48
Other Decks in Programming
See All in Programming
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
770
エディターってAIで操作できるんだぜ
kis9a
0
730
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.2k
AWS CDKの推しポイントN選
akihisaikeda
1
240
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
これならできる!個人開発のすゝめ
tinykitten
PRO
0
110
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
160
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
connect-python: convenient protobuf RPC for Python
anuraaga
0
410
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Producing Creativity
orderedlist
PRO
348
40k
Writing Fast Ruby
sferik
630
62k
It's Worth the Effort
3n
187
29k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Site-Speed That Sticks
csswizardry
13
1k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
A Tale of Four Properties
chriscoyier
162
23k
A designer walks into a library…
pauljervisheath
210
24k
KATA
mclloyd
PRO
33
15k
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