ruby-changes:30265
From: mrkn <ko1@a...>
Date: Fri, 2 Aug 2013 02:33:43 +0900 (JST)
Subject: [ruby-changes:30265] mrkn:r42317 (trunk): * NEWS: Add the description of number literal suffixes.
mrkn 2013-08-02 02:33:29 +0900 (Fri, 02 Aug 2013) New Revision: 42317 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42317 Log: * NEWS: Add the description of number literal suffixes. Modified files: trunk/ChangeLog trunk/NEWS Index: ChangeLog =================================================================== --- ChangeLog (revision 42316) +++ ChangeLog (revision 42317) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Aug 2 02:32:00 2013 Kenta Murata <mrkn@m...> + + * NEWS: Add the description of number literal suffixes. + Thu Aug 2 00:02:00 2013 Kenta Murata <mrkn@m...> * bootstraptest/test_literal_suffix.rb: add two test cases to Index: NEWS =================================================================== --- NEWS (revision 42316) +++ NEWS (revision 42317) @@ -12,6 +12,16 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L12 == Changes since the 2.0.0 release === Language changes + +* Added integer and float literals: 'r', 'i', and 'ri'. + * "42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize, + respectively. But exponential form with 'r' suffix like "6.022e+23r" is + not accepted bcause it is misleadable. + * "42i" and "3.14i" are evaluated as Complex(0, 1) and Complex(0, 1.5), + respectively. + * "42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r), + respectively. + === Core classes updates (outstanding ones only) * GC -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/