From: Akinori MUSHA Date: 2000-10-10T14:17:24+09:00 Subject: [ruby-talk:5364] Allowing *ary's in the middle of a camma separated list Hi, I was writing some script and wanted to do the following thing, but it didn't work as Ruby's current grammar doesn't allow *ary in the middle of a camma separated list: options = ['-b', '-d', '-u'] system 'rcsdiff', *options, "-r#{revold}", "-r#{revnew}", "#{root}/#{file},v" I can cope with this situation by .flatten'ing the whole list however, I don't feel like it because I certainly know which elements need to be flattened. (ARGV in this case, of course) system *(['rcsdiff', options"-r#{revold}", "-r#{revnew}", "#{root}/#{file},v"].flatten) (Yes, I know I can omit *(..) enclosing as system() also takes an array, but I'm talking in general here.) Now, can Ruby's grammar be changed to accept *ary's in the middle of a camma separated list where it's not a part of L-value? P.S. I also think it's nice to accept it even in an L-value like this: rev = "1.1.2.2" *first, last = rev.split '.' but I wouldn't insist that, as it must increase the complexity much. -- / /__ __ / ) ) ) ) / Akinori -Aki- MUSHA aka / (_ / ( (__( @ idaemons.org / FreeBSD.org "We're only at home when we're on the run, on the wing, on the fly"