diff --git a/ChangeLog b/ChangeLog index cf8ac26fda..46dd38ba57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 22 15:13:38 2014 Benoit Daloze + + * 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 * lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos diff --git a/range.c b/range.c index 4526dcba89..d2d9a707c0 100644 --- a/range.c +++ b/range.c @@ -711,9 +711,12 @@ sym_each_i(RB_BLOCK_CALL_FUNC_ARGLIST(v, arg)) * 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 diff --git a/version.h b/version.h index e6f197f5b0..5af029549a 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #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