From: IWAOKA Masahiro Date: 2003-06-23T22:14:20+09:00 Subject: [ruby-list:37818] Re: 配列の使い方 In the message <20030623213319.DF59.TIETEW-ML-RUBY-LIST@tietew.net>, on Mon, Jun 23, 2003 at 09:34:51PM +0900, Tietew wrote: > @@ary = (1..3).collect { Hoge.new } おぉっ、すっきりしてる。と思ったのですが、 > @@ary = (1..3).collect { Hoge.new } ならば問題なくて、 p (1..3).collect { Hoge.new } とすると undefined method `collect' for nil (NameError) となってし まうのは何故でしょうか? いわおか