diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-03 22:31:25 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-03 22:31:25 +0000 |
commit | aec0f808bc79c6964632cf1385bf8c61888b66fd (patch) | |
tree | 082e8d6679beb9605819f22e615ae0a959646724 /array.c | |
parent | 90dfc8f99e774e5ed71b4ed09a14bb75febca936 (diff) | |
download | ruby-aec0f808bc79c6964632cf1385bf8c61888b66fd.tar.gz |
* 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.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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) |