Skip to content

Instantly share code, notes, and snippets.

@hkdnet
Created June 27, 2021 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkdnet/0759d427dd7b6a059a45e01736ad5841 to your computer and use it in GitHub Desktop.
Save hkdnet/0759d427dd7b6a059a45e01736ad5841 to your computer and use it in GitHub Desktop.
diff --git a/struct.c b/struct.c
index ceb025ff83..6fc489e3a2 100644
--- a/struct.c
+++ b/struct.c
@@ -1401,6 +1401,8 @@ InitVM_Struct(void)
rb_undef_alloc_func(rb_cStruct);
rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1);
+ rb_define_singleton_method(rb_cStruct, "keyword_init?", rb_struct_s_keyword_init, 0);
+
rb_define_method(rb_cStruct, "initialize", rb_struct_initialize_m, -1);
rb_define_method(rb_cStruct, "initialize_copy", rb_struct_init_copy, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment