mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@44549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e5839862e4
commit
d31cd06516
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Jan 10 06:23:21 2014 Benoit Daloze <eregontp@gmail.com>
|
||||
|
||||
* range.c (Range#size): [DOC] improve description and add examples.
|
||||
Patch by @skade. [Fixes GH-501]
|
||||
|
||||
Fri Jan 10 00:47:52 2014 Josef Stribny <strzibny@gmail.com>
|
||||
|
||||
* ext/tk/extconf.rb: fix to pass arrays instead of strings to
|
||||
|
|
5
range.c
5
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
|
||||
|
|
Loading…
Reference in a new issue