From: nobu.nokada@... Date: 2003-11-29T17:30:21+09:00 Subject: Re: ruby-dev summary: 21928-22011 Hi, At Sat, 29 Nov 2003 06:42:13 +0900, Simon Strandgaard wrote: > > [ruby-dev:21933] new hash literal > > Nobu Nakata read Matz's RC2003 slides > > (http://www.rubyist.net/~matz/slides/rc2003/mgp00027.html) > > and made a patch for a new hash literal like {key: value}. > > Matz slide says: > {a: 45, b: 55, c: 65} same as {:a => 45, :b => 55 :c => 65} > > > Will it be possible to leave out spaces, > so that {a:45, b:55, c:65} are possible ? Yes, but impossible to put spaces before colons. {a :45, b :55, c :65} same as {a(:45), b(:55), c(:65)} But :45 and so on cause SyntaxError, of course. > Leaving out comma, will it be possible? > like this: {a:45 b:55 c:65} No. I've not thought about such syntax. > What happens if no value are specified ? nil? > For instance 'verbose:' has no value > copy source:"file.in" dest:"file.out" verbose: Parse error. -- Nobu Nakada