THE RUBY LANGUAGE• Originally by Yukihiro "Matz" Matsumoto• “Ruby is designed for programmer productivity and fun, following the principles of good user interface design. He stresses that systems design needs to emphasize human, rather than computer, needs.” http://en.wikipedia.org/wiki/Ruby_(programming_language)#History• Ruby 1.0 was released in 1996.
RUBY LANGUAGE OVERVIEW• Dynamically typed• Interpreted• Can be modiﬁed at runtime• Object oriented• Blocks & lambdas• Nice support for Regular Expressions
RUBY VERSIONSruby -v•1.8.6 – Still around but mostly supplanted by 1.8.7•1.8.7 – some 1.9 features, compatible w/ 1.8.6•1.9.2 – latest version, many VMs, Rails 2.3+
LETS GET STARTED• IRB: InteractiveRuBy>> 4>> 4 + 4
EVERYTHING IS AN OBJECT“test”.upcase“test”.class“test”.methods
EVERYTHING EVALUATES TO SOMETHING2+2(2+2).zero?
METHODS ARE MESSAGESthing.do(4)thing.do 4thing.send “do”, 4