[前][次][番号順一覧][スレッド一覧]

ruby-changes:32934

From: nagachika <ko1@a...>
Date: Mon, 17 Feb 2014 01:59:15 +0900 (JST)
Subject: [ruby-changes:32934] nagachika:r45013 (ruby_2_0_0): merge revision(s) r44549: [Backport #9387]

nagachika	2014-02-17 01:59:09 +0900 (Mon, 17 Feb 2014)

  New Revision: 45013

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45013

  Log:
    merge revision(s) r44549: [Backport #9387]
    
    * range.c (Range#size): [DOC] improve description and add examples.
      Patch by @skade. [Fixes GH-501]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/range.c
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 45012)
+++ ruby_2_0_0/ChangeLog	(revision 45013)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Mon Feb 17 01:57:45 2014  Benoit Daloze  <eregontp@g...>
+
+	* 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@r...>
 
 	* lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML
Index: ruby_2_0_0/range.c
===================================================================
--- ruby_2_0_0/range.c	(revision 45012)
+++ ruby_2_0_0/range.c	(revision 45013)
@@ -696,9 +696,12 @@ sym_each_i(VALUE v, void *arg) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/range.c#L696
  *  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_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 45012)
+++ ruby_2_0_0/version.h	(revision 45013)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #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

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44549


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]