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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
81
Actor Model
linjunpop
0
33
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
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
150
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
590
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
440
ロボットのための工場に灯りは要らない
watany
10
2.9k
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
490
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
410
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
340
「抽象に依存せよ」が分からなかった新卒1年目の私が Goのインターフェースと和解するまで
kurogenki
0
120
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
950
CSC307 Lecture 14
javiergs
PRO
0
470
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
510
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
830
How to build a perfect <img>
jonoalderson
1
5.3k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Bash Introduction
62gerente
615
210k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
Test your architecture with Archunit
thirion
1
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Exploring anti-patterns in Rails
aemeredith
2
290
エンジニアに許された特別な時間の終わり
watany
106
240k
The browser strikes back
jonoalderson
0
800
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