This project is closed and read-only.
Actions
Backport #1183
closedAdding support for the new hash literal syntax
Backport #1183:
Adding support for the new hash literal syntax
Status:
Closed
Assignee:
Description
=begin
Attached is a patch for ruby_1_8 which adds support for the new literal syntax for hash and hash style arguments.
However, there needs some more work to retain the use of colon in place of then/do, in order to keep backward compatibility, although it has been deprecated and dropped in 1.9.
knu@daemon[1]% ruby-1.8.7 -ve 'if true: p(1); end'
ruby 1.8.7 (2008-11-11 patchlevel 73) [x86_64-freebsd7]
1
knu@daemon[1]% ruby-1.8 -ve 'if true: p(1); end'
ruby 1.8.7p5000 (2009-02-19 revision 22433) [x86_64-freebsd7]
-e:1: syntax error, unexpected tLABEL
if true: p(1); end
^
-e:1: syntax error, unexpected kEND, expecting $end
=end
Files
Actions