From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-02-08T11:24:36+09:00 Subject: Re: Question about array expansion in 1.7/1.8 In article <1013127734.884190.5515.nullmailer@ev.netlab.jp>, Yukihiro Matsumoto wrote: >Hi, > >In message "Question about array expansion in 1.7/1.8" > on 02/02/08, Phil Tomson writes: >| >|In the book "The Ruby Way" there is a section entitled "What's new in >|1.8". On Page 534 in the bullet on Array Expansion it says: >| >|"Array Expansion: if you assign a = *[1], you now find that a is 1 (rather >|than [1] as before)." > >Yes. > > % ruby -ve 'a = *[1]; p a' > ruby 1.7.2 (2002-02-06) [i686-linux] > 1 > >|irb(main):009:0* a = *[1] >|[1] >|irb(main):010:0> p a >|[1] >|nil >|irb(main):011:0> p a.type >|Array >|nil >|irb(main):012:0> exit >|[phill@jed bin]$ ./ruby -v >|ruby 1.7.2 (2002-02-07) [i686-linux] > >I guess your *irb* is based on 1.6; check RUBY_VERSION within irb. > > matz. > You're right, in irb: irb(main):001:0> p RUBY_VERSION "1.6.4" nil strange... Phil