summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c13
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 43c3ecd56c..9824f1b611 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 4 07:30:50 2011 Eric Hodel <drbrain@segment7.net>
+
+ * array.c (rb_ary_s_create): Add example results for Array::[]. Patch
+ by Jonathan Mukai. [Ruby 1.9 - Bug #5215]
+
Tue Oct 4 07:15:17 2011 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Update to RubyGems 1.8.11. Move Deprecate into the
diff --git a/array.c b/array.c
index 8816d15590..0f3e9c77c6 100644
--- a/array.c
+++ b/array.c
@@ -593,14 +593,13 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
return ary;
}
-
/*
-* Returns a new array populated with the given objects.
-*
-* Array.[]( 1, 'a', /^A/ )
-* Array[ 1, 'a', /^A/ ]
-* [ 1, 'a', /^A/ ]
-*/
+ * Returns a new array populated with the given objects.
+ *
+ * Array.[]( 1, 'a', /^A/ ) # => [1, "a", /^A/]
+ * Array[ 1, 'a', /^A/ ] # => [1, "a", /^A/]
+ * [ 1, 'a', /^A/ ] # => [1, "a", /^A/]
+ */
static VALUE
rb_ary_s_create(int argc, VALUE *argv, VALUE klass)