ruby-changes:73818
From: Nobuyoshi <ko1@a...>
Date: Sat, 1 Oct 2022 15:37:34 +0900 (JST)
Subject: [ruby-changes:73818] c767618d4c (master): Do not define the method only for RDoc
https://git.ruby-lang.org/ruby.git/commit/?id=c767618d4c From c767618d4c3319c60155ee2c56450ed7e933b596 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 1 Oct 2022 15:36:01 +0900 Subject: Do not define the method only for RDoc `Data.members` fails an assertion. --- struct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/struct.c b/struct.c index 57d7cffc30..a025d21af6 100644 --- a/struct.c +++ b/struct.c @@ -2167,7 +2167,9 @@ InitVM_Struct(void) https://github.com/ruby/ruby/blob/trunk/struct.c#L2167 rb_undef_alloc_func(rb_cData); rb_define_singleton_method(rb_cData, "define", rb_data_s_def, -1); +#if 0 /* for RDoc */ rb_define_singleton_method(rb_cData, "members", rb_data_s_members_m, 0); +#endif rb_define_method(rb_cData, "initialize", rb_data_initialize_m, -1); rb_define_method(rb_cData, "initialize_copy", rb_struct_init_copy, 1); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/