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
Mohamed Magdy
April 24, 2013
Programming
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby 2.0
A brief introduction to Ruby 2.0.
Mohamed Magdy
April 24, 2013
Other Decks in Programming
See All in Programming
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.4k
ジョジョの世界をXRで再現する
mofurune
0
160
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
APNsからLive Activityを開始する話
yumnumm
0
170
Railsバージョンを4倍にした話
optim
0
380
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
570
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Writing Fast Ruby
sferik
630
63k
How to Talk to Developers About Accessibility
jct
2
580
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Docker and Python
trallard
47
4.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
Skip the Path - Find Your Career Trail
mkilby
1
260
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Discover your Explorer Soul
emna__ayadi
2
1.3k
Transcript
Ruby 2.0
Agenda • What's new in Ruby 2.0? – Intro –
Installation – What's new? • Hicks and tricks (not Ruby only)
What's new in Ruby 2.0? • Ruby 2.0 was released
in Feb 24th, 2013. 2 months back • 100% Ruby 2.0 is backward comaptible ~ Matz • Awesome new features (coming on)
Installation • RVM – rvm get stable • Mine is
rvm 1.19.1 – rvm install ruby-2.0.0 • Today ruby 2.1.0dev (with rvm install ruby-head)
So what's new? • Refinements • Module#prepend • Enumerable#lazy •
Keyword arguments • %i or %I • Garbage collector (maybe discussed later)
Refinments
Refinments (1) • Monkey patching (open classes) affects all instances
Refinments (2)
Refinments (3) • How to solve the monkey patching problem?
– Module#refine – Kernel#using
Module#refine (1)
Module#refine (2)
Kernel#using (1)
Kernel#using (2)
Kernel#using (3)
Kernel#using (4)
Kernel#using (5)
Refinment Example (1) Rspec pollution
Refinment Example (2)
Refinment Example (3) • https://github.com/amatsuda/rspec- refinements • https://github.com/amatsuda/activerecord- refinements
WARNING (irb):3: warning: Refinements are experimental, and the behavior may
change in future versions of Ruby!
Module#prepend
Module#prepend (1)
Module#prepend (2) • "alias_method_chain" was replaced with Modules in Rails
3
Module#prepend (3)
Module#prepend (4)
Module#prepend (5) • What if I want to extend the
"foo" method without "alias_method_chain"?
Module#prepend (6)
Enumerable#lazy
Enumerable#lazy
Keyword Arguments
Keyword Arguments (1)
Keyword Arguments (2)
%i or %I
%i or %I • Defines an array of symboles
Hicks and tricks (not Ruby only)
Hicks and tricks (not Ruby only) • define_method • Observers
in Rails
define_method
Rails Observer • rails g observer feature
Credits • Most of the contents (almost all) are cited
from Akira Matsuda – http://www.youtube.com/watch?v=RHcXC9R Ojlw – https://speakerdeck.com/a_matsuda/ruby-2- dot-0-on-rails
Thanks