Hi,

At Tue, 11 Jan 2005 17:00:05 +0900,
Yukihiro Matsumoto wrote in [ruby-core:04184]:
> |Not the most important case, but... using space as a delimiter for %w
> |worked in 1.6.8 but not in 1.8.2:
> 
> |Is this intentional?
> 
> Yes.  The parser confuses separating spaces and delimiters now.  It
> used to cut text until delimiters and parse it.  It's the cost to pay
> for better string interpolation.

Well, actually it seems possible.


Index: parse.y =================================================================== RCS file: /cvs/ruby/src/ruby/parse.y,v retrieving revision 1.366 diff -U2 -p -r1.366 parse.y --- parse.y 5 Jan 2005 08:00:48 -0000 1.366 +++ parse.y 11 Jan 2005 16:12:09 -0000 @@ -4964,4 +4964,8 @@ parser_parse_string(parser, quote) c = nextc(); if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + if (c == term && !quote->nd_nest) { + quote->nd_func = -1; + return ' '; + } do {c = nextc();} while (ISSPACE(c)); space = 1;
-- Nobu Nakada