I wouldn't worry about the performance in your example too much. If you
are worried anyway you can monkey w/ the 'Benchmark' module (the docs,
at
www.ruby-doc.org/core, give examples).
maybe something like this maybe?:
require 'benchmark'
puts Benchmark.measure { 100_000.times { Array.new() } }
puts Benchmark.measure { 100_000.times { [] } }
Regarding conventions/idioms, here are just a few links to get you
started, I'm sure there are many more if you look around a bit.
http://www.rubygarden.org/ruby?RubyStyleGuide
http://www.rubygarden.org/ruby?RubyIdioms
http://www.rubygarden.org/ruby?Examp...PatternsInRuby
http://pleac.sourceforge.net/pleac_ruby/
Another good way to learn good ruby coding is to look at well written
ruby code (the ruby core, rails, etc.).
Good luck,
zak