From: dblack@... Date: 2003-04-01T12:24:07+09:00 Subject: Re: Change to /.../.match("foo") behaviour in 1.6.8? Hi -- On Tue, 1 Apr 2003, Yukihiro Matsumoto wrote: > Hi, > > In message "Change to /.../.match("foo") behaviour in 1.6.8?" > on 03/03/31, Austin Ziegler writes: > > |In 1.6.7 and 1.7, I had the following line work: > | > | l, m1, m2 = /((?:\S+\s+){11})(.+)/.match(line) > | > |This meant that #match return worked like an array. > > Put "*" before the expression, e.g. > > l, m1, m2 = */((?:\S+\s+){11})(.+)/.match(line) I'm getting confused.... It looks like 1.8 goes back to the 1.4 behavior -- am I right about that? candle:~$ ruby -ve 'a, b = /(.)/.match("ab"); p a,b' ruby 1.8.0 (2003-03-03) [i686-linux] "a" "a" and for the other behavior, the * doesn't seem to change it (in this 1.6.8 example): candle:~$ ruby/1.6.8/bin/ruby -ve 'a, b = */(.)/.match("ab"); p a,b' ruby 1.6.8 (2002-12-24) [i686-linux] # nil David -- David Alan Black home: dblack@superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav