ruby-changes:33039
From: naruse <ko1@a...>
Date: Sat, 22 Feb 2014 15:16:23 +0900 (JST)
Subject: [ruby-changes:33039] naruse:r45118 (ruby_2_1): merge revision(s) 44549: [Backport #9387]
naruse 2014-02-22 15:16:18 +0900 (Sat, 22 Feb 2014) New Revision: 45118 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45118 Log: merge revision(s) 44549: [Backport #9387] * range.c (Range#size): [DOC] improve description and add examples. Patch by @skade. [Fixes GH-501] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/range.c branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 45117) +++ ruby_2_1/ChangeLog (revision 45118) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Sat Feb 22 15:13:38 2014 Benoit Daloze <eregontp@g...> + + * range.c (Range#size): [DOC] improve description and add examples. + Patch by @skade. [Fixes GH-501] + Sat Feb 22 15:07:58 2014 Zachary Scott <e@z...> * lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos Index: ruby_2_1/range.c =================================================================== --- ruby_2_1/range.c (revision 45117) +++ ruby_2_1/range.c (revision 45118) @@ -711,9 +711,12 @@ sym_each_i(RB_BLOCK_CALL_FUNC_ARGLIST(v, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/range.c#L711 * call-seq: * rng.size -> num * - * Returns the number of elements in the range. + * Returns the number of elements in the range. Both the begin and the end of + * the Range must be Numeric, otherwise nil is returned. * * (10..20).size #=> 11 + * ('a'..'z').size #=> nil + * (-Float::INFINITY..Float::INFINITY).size #=> Infinity */ static VALUE Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 45117) +++ ruby_2_1/version.h (revision 45118) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-22" -#define RUBY_PATCHLEVEL 62 +#define RUBY_PATCHLEVEL 63 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44549 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/