From: Dave Thomas Date: 2000-12-08T06:06:22+09:00 Subject: [ruby-talk:6914] Re: array of hashes "Joseph McDonald" writes: > That would be great! It would also be nice if fixnums and strings > sprang into existence as not nil, so you could start using them > right away (in a loop for instance). good defaults would be "0" and "" I don't believe that Fixnums and Strings have any defaults. However, in Ruby, variables, which reference objects, default to nil when they have not yet been assigned a value. I believe that old versions of Ruby had semantics so that nil + tended to work: nil + "hi" => "hi" nil + 12 => 12 I think it was removed because it hid a number of typing errors: 10.times { |count| fred(coumt + 10) } You can always add the behavior back by adding the appropriate methods to nill def nil.+(x) x end nil + "hi" #=> "hi" nil + 12 #=> 12 Regards Dave