Ruby gotchas

From xoa

Jump to: navigation, search

I started playing with Ruby some, and made notes about differences from Perl.

You have to have X.new, but initialize() for the class name.

Data::Dumper($object) is object#inspect

chomp($str) is str.chomp!

See also Dan Rench's Ruby Rosetta Stone http://dren.ch/dev/rosetta_stone.html

Personal tools