ruby-changes:49116
From: stomar <ko1@a...>
Date: Thu, 14 Dec 2017 19:25:21 +0900 (JST)
Subject: [ruby-changes:49116] stomar:r61232 (trunk): struct.c: [DOC] improve docs for Struct.new
stomar 2017-12-14 19:25:17 +0900 (Thu, 14 Dec 2017) New Revision: 61232 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61232 Log: struct.c: [DOC] improve docs for Struct.new Modified files: trunk/struct.c Index: struct.c =================================================================== --- struct.c (revision 61231) +++ struct.c (revision 61232) @@ -475,11 +475,10 @@ rb_struct_define_under(VALUE outer, cons https://github.com/ruby/ruby/blob/trunk/struct.c#L475 * Customer.new("Dave", "123 Main") * #=> #<struct Customer name="Dave", address="123 Main"> * - * If keyword_init: true option is given, .new takes keyword arguments instead - * of normal arguments. + * If the optional +keyword_init+ keyword argument is set to +true+, + * .new takes keyword arguments instead of normal arguments. * * Customer = Struct.new(:name, :address, keyword_init: true) - * #=> Customer * Customer.new(name: "Dave", address: "123 Main") * #=> #<struct Customer name="Dave", address="123 Main"> * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/