diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | range.c | 5 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Feb 17 01:57:45 2014 Benoit Daloze <eregontp@gmail.com> + + * range.c (Range#size): [DOC] improve description and add examples. + Patch by @skade. [Fixes GH-501] + Mon Feb 17 01:51:49 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML @@ -696,9 +696,12 @@ sym_each_i(VALUE v, void *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 @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-02-17" -#define RUBY_PATCHLEVEL 431 +#define RUBY_PATCHLEVEL 432 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 |