summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-03 22:31:25 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-03 22:31:25 +0000
commitaec0f808bc79c6964632cf1385bf8c61888b66fd (patch)
tree082e8d6679beb9605819f22e615ae0a959646724 /array.c
parent90dfc8f99e774e5ed71b4ed09a14bb75febca936 (diff)
* array.c (rb_ary_s_create): Add example results for Array::[]. Patch
by Jonathan Mukai. [Ruby 1.9 - Bug #5215] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c13
1 files changed, 6 insertions, 7 deletions
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)