aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-05-07 23:58:19 -0400
committerMarc-André Lafortune <github@marc-andre.ca>2020-05-08 04:18:45 -0400
commitadf709a78534c1483ba851ccb0490464ca31503c (patch)
tree3bd79435a29f2320e457646839e98768c69862f7 /include/ruby
parentda345adc1c9cb6182ee11c43853f67bb41aeea76 (diff)
downloadruby-adf709a78534c1483ba851ccb0490464ca31503c.tar.gz
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 <mame@ruby-lang.org> Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: Adam Hess <HParker@github.com> Co-authored-by: Jose Cortinas <jacortinas@gmail.com> Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/3/intern/object.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ruby/3/intern/object.h b/include/ruby/3/intern/object.h
index acfe63fa06..502fbab908 100644
--- a/include/ruby/3/intern/object.h
+++ b/include/ruby/3/intern/object.h
@@ -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_pass_kw(int, const VALUE *, VALUE);
VALUE rb_class_new_instance(int, const VALUE*, VALUE);
VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);