New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct.c: add keyword_init option to Struct.new #1771

Closed
wants to merge 5 commits into
base: trunk
from

Conversation

1 participant
@k0kubun
Member

k0kubun commented Dec 10, 2017

Patch for: https://bugs.ruby-lang.org/issues/11925#note-11

Foo = Struct.new(:a, :b, keyword_init: true)
Foo.new(a: 1, b: 2) #=> #<struct Foo a=1, b=2>

@k0kubun k0kubun changed the title from struct.c: add keyword_args option to Struct.new to struct.c: add keyword_init option to Struct.new Dec 12, 2017

@matzbot matzbot closed this in 0201597 Dec 12, 2017

@k0kubun k0kubun deleted the k0kubun:struct-keyword-args branch Dec 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment