3. • Programming Language
• 1995 – First public release
• Many Implementations
• MRI 1.8 – Matz’s Ruby
Intepreter
• YARV 1.9
• JRuby
• IronRuby
• Rubinius
• MacRuby
• MagLev
4. “I wanted a scripting language that was more powerful
than Perl, and more object-oriented than Python.That's
why I decided to design my own language”
40. Ruby’s Block
• Passing a block as argument
• Method “yield” or “call” the block
• May passing a object as argument
• Result from the block goes back to the
method
41.
42. 7. We love duck
http://www.flickr.com/photos/ymorimo/3975152607/
43. Duck typing
• If it quacks like a duck, it’s a duck!
• Check for object’s property, not interface
47. Duck Punching
(Monkey patch)
• Objects and class are open
• Add method to object even at Runtime!
• Not really recommend, less maintainability,
might break some stuff
• But it’s awesome
51. Testing ...
• Ensure everything still works after you
make change to something else
• Save you ass from client’s call at 3AM
• Test driven development
• Write test – watch it fails – write just
enough code to make it pass – refactor