summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-14 10:25:17 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-14 10:25:17 +0000
commit4a8aa278b580c974697f1347377d7d2c8eeb6734 (patch)
tree62dedbef594454286de1c68774d6535b6b84f2a0
parent09004db450f9e6f946efed802632b1b648b5265e (diff)
struct.c: [DOC] improve docs for Struct.new
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--struct.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/struct.c b/struct.c
index 3a21ec8dbf..654e8670fa 100644
--- a/struct.c
+++ b/struct.c
@@ -475,11 +475,10 @@ rb_struct_define_under(VALUE outer, const char *name, ...)
* 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">
*