This is a multi-part message in MIME format.
--------------090206000804030901050506
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
The following program is legal in Ruby 1.9 and prints 6:
# -*- coding: utf-8 -*-
alias λ lambda
|x,y| x*y}
puts ¥ÆÍ¼2,3]
Is this a good thing? Is this expected to remain legal, or is the
parser likely to start enforcing rules about which characters are legal
in identifiers?
(If you can't see the special characters, I'm using the greek letter
lambda as an alias for the "lambda" method. Then I'm creating a lambda
and assigning it to a variable that uses the Unicode multiplication sign.)
The program might not work for you if you cut-and-pasted it from this
message. I believe the encoding got munged when I cut and pasted it to
my mail program. So I've also attached a gzipped version of the program
to this message to preserve the utf-8 encoding. You may or may not be
able to display the program, but I you ought to be able to run it.
David
--------------090206000804030901050506
Content-Type: application/x-gzip;
name nicodeidents.rb.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename nicodeidents.rb.gz"
H4sICDq1+kYAA3VuaWNvZGVpZGVudHMucmIAU1bQ1dJVSM5PycxLt1IoLUnTtQCJcCXmZCYW
K5zbrZCTmJuUksh1eLqCLZBbrVBToVNZo1ChVVnLVVBaUqxweHq0kY5xLBcA5AGZGkkAAAA--------------090206000804030901050506--