1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* object.c: rdoc formatting for Kernel#Array()

* array.c: Add rdoc for Array() method to Creating Arrays section


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-02-19 03:32:11 +00:00
parent 2163738ffb
commit 281e6e1b3b
3 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 19 12:30:00 2013 Zachary Scott <zachary@zacharyscott.net>
* object.c: rdoc formatting for Kernel#Array()
* array.c: Add rdoc for Array() method to Creating Arrays section
Tue Feb 19 10:35:52 2013 Eric Hodel <drbrain@segment7.net>
* ext/openssl/ossl.c (class OpenSSL): Use only inner parenthesis in

View file

@ -5240,6 +5240,11 @@ rb_ary_drop_while(VALUE ary)
* empty_table = Array.new(3) { Array.new(3) }
* #=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
*
* An array can also be created by using the Array() method, provided by
* Kernel, which calls #to_ary or #to_a on it's argument.
*
* Array({:a => "a", :b => "b"}) #=> [[:a, "a"], [:b, "b"]]
*
* == Example Usage
*
* In addition to the methods it mixes in through the Enumerable module, the

View file

@ -2727,8 +2727,9 @@ rb_Array(VALUE val)
* call-seq:
* Array(arg) -> array
*
* Returns <i>arg</i> as an <code>Array</code>. First tries to call
* <i>arg</i><code>.to_ary</code>, then <i>arg</i><code>.to_a</code>.
* Returns +arg+ as an Array.
*
* First tries to call Array#to_ary on +arg+, then Array#to_a.
*
* Array(1..5) #=> [1, 2, 3, 4, 5]
*/