From: Chris Pine Date: 2003-03-24T02:20:43+09:00 Subject: Re: Question about behavior of Array.new ----- Original Message ----- From: "Jeremy" I recently used the following in a program (game) I'm working on: board = Array.new(9,Space.new) Can anyone enlighten me on this? ---------------------------- What you are doing is the same as this: justOneSpace = Space.new board = Array.new(9,justOneSpace) Make more sense now? You weren't passing in the *code* `Space.new', just the object it returned. If you want to pass in the *code*, use a block: board = Array.new(9) {Space.new} That was a good question. Maybe I should put this in my tutorial. Chris