ruby-changes:4966
From: ko1@a...
Date: Mon, 19 May 2008 05:27:48 +0900 (JST)
Subject: [ruby-changes:4966] knu - Ruby:r16459 (ruby_1_8): Add an entry about String#{to_i,oct,hex} not accepting a sequence of
knu 2008-05-19 05:27:39 +0900 (Mon, 19 May 2008) New Revision: 16459 Modified files: branches/ruby_1_8/NEWS Log: Add an entry about String#{to_i,oct,hex} not accepting a sequence of underscores (`__'). http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/NEWS?r1=16459&r2=16458&diff_format=u Index: ruby_1_8/NEWS =================================================================== --- ruby_1_8/NEWS (revision 16458) +++ ruby_1_8/NEWS (revision 16459) @@ -351,6 +351,24 @@ === Compatibility issues (excluding feature bug fixes) +* String#to_i, String#hex and String#oct no longer accept a sequence + of underscores (`__'). + + # Ruby 1.8.6 + '1__0'.to_i #=> 10 + '1__0'.to_i(2) #=> 2 # 0b10 + '1__0'.oct #=> 8 # 010 + '1__0'.hex #=> 16 # 0x10 + + # Ruby 1.8.7 + '1__0'.to_i #=> 1 + '1__0'.to_i(2) #=> 1 + '1__0'.oct #=> 1 + '1__0'.hex #=> 1 + + The old behavior was inconsistent with Ruby syntax and considered as + a bug. + * tempfile * The file name format has changed. No dots are included by default -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/