diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 13 |
2 files changed, 11 insertions, 7 deletions
@@ -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 @@ -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) |