summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 155017382c..a66c3d2fe0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun May 25 06:29:39 2014 Zachary Scott <e@zzak.io>
+
+ * array.c: [DOC] Clarify default argument for Array.new.
+ By @Elffers [Fixes GH-610]
+
Sat May 24 22:37:20 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* array.c: [DOC] Add more documents to shuffle! and shuffle.
diff --git a/array.c b/array.c
index ca3b8a4769..3f5605526e 100644
--- a/array.c
+++ b/array.c
@@ -671,16 +671,16 @@ rb_ary_s_try_convert(VALUE dummy, VALUE ary)
/*
* call-seq:
- * Array.new(size=0, obj=nil)
+ * Array.new(size=0, default=nil)
* Array.new(array)
* Array.new(size) {|index| block }
*
* Returns a new array.
*
* In the first form, if no arguments are sent, the new array will be empty.
- * When a +size+ and an optional +obj+ are sent, an array is created with
- * +size+ copies of +obj+. Take notice that all elements will reference the
- * same object +obj+.
+ * When a +size+ and an optional +default+ are sent, an array is created with
+ * +size+ copies of +default+. Take notice that all elements will reference the
+ * same object +default+.
*
* The second form creates a copy of the array passed as a parameter (the
* array is generated by calling to_ary on the parameter).