diff options
author | Marc-Andre Lafortune <@marc-andre.ca> | 2020-05-07 23:58:19 -0400 |
---|---|---|
committer | Marc-André Lafortune <@marc-andre.ca> | 2020-05-08 04:18:45 -0400 |
commit | adf709a78534c1483ba851ccb0490464ca31503c () | |
tree | 3bd79435a29f2320e457646839e98768c69862f7 /include/ruby/3/intern | |
parent | da345adc1c9cb6182ee11c43853f67bb41aeea76 (diff) |
Classes made from Struct should have default `new` singleton method.
[Bug #16465] [Bug #16801] [Fix GH-2795] [Fix GH-2944] [Fix GH-3045] [Fix GH-3093] Note: Backporting shouldn't modify object.h and instead can use struct_new_kw which is basically a duplicate implementation of rb_class_new_instance_pass_kw Co-authored-by: Yusuke Endoh <[email protected]> Co-authored-by: John Hawthorn <[email protected]> Co-authored-by: Adam Hess <[email protected]> Co-authored-by: Jose Cortinas <[email protected]> Co-authored-by: Jean Boussier <[email protected]>
Notes: Merged: https://.com/ruby/ruby/pull/3093
-rw-r--r-- | include/ruby/3/intern/object.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -30,6 +30,7 @@ RUBY3_SYMBOL_EXPORT_BEGIN() ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1)) #define OBJ_INIT_COPY(obj, orig) RB_OBJ_INIT_COPY(obj, orig) VALUE rb_class_new_instance(int, const VALUE*, VALUE); VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int); |