summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-16 16:59:09 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-16 16:59:09 +0000
commit9d6dd89400847790875e7a60085530817dfb5541 (patch)
tree6a0ea474e328ec9ed149e208dadba22ad84dcbf4
parent954b8281834fa095d53279a7effb1352aedc7f8c (diff)
merge revision(s) r44549: [Backport #9387]
* range.c (Range#size): [DOC] improve description and add examples. Patch by @skade. [Fixes GH-501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--range.c5
-rw-r--r--version.h2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d0ca12bc4..24d2c4e8be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/range.c b/range.c
index e2e8388c43..cea90140d9 100644
--- a/range.c
+++ b/range.c
@@ -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
diff --git a/version.h b/version.h
index acf5d45e42..a5cace0d21 100644
--- a/version.h
+++ b/version.h
@@ -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