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.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
57
Actor Model
linjunpop
0
28
Ruby for iOS developer
linjunpop
0
1k
A brief introduction to GitHub
linjunpop
1
66
Test Driven Development
linjunpop
0
46
Other Decks in Programming
See All in Programming
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
100
TDD 実践ミニトーク
contour_gara
1
290
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
250
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
400
はじめてのMaterial3 Expressive
ym223
2
240
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
速いWebフレームワークを作る
yusukebe
5
1.7k
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1.1k
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
200
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
Laravel Boost 超入門
fire_arlo
2
210
RDoc meets YARD
okuramasafumi
4
170
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
4k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
Unsuck your backbone
ammeep
671
58k
Typedesign – Prime Four
hannesfritz
42
2.8k
How to train your dragon (web standard)
notwaldorf
96
6.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
RailsConf 2023
tenderlove
30
1.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Done Done
chrislema
185
16k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Code Reviewing Like a Champion
maltzj
525
40k
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