aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c5
-rw-r--r--object.c5
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 10ba888d1c..3e0dacee49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/array.c b/array.c
index a7c74a2aa4..c9ff128df0 100644
--- a/array.c
+++ b/array.c
@@ -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
diff --git a/object.c b/object.c
index ba4f997b3a..474d1e7efb 100644
--- a/object.c
+++ b/object.c
@@ -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]
*/