diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-16 13:19:06 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-17 16:22:44 -0700 |
commit | 9b35dc38644c10eed008f9ba19a7224f2fb49af2 (patch) | |
tree | 9c6c97cfd1cd828d8796145956621d6ac08ea6e8 /ext/-test- | |
parent | 0785469a400b00eb4576fedbf93b614c70eaf760 (diff) |
Pass keyword argument flag when rb_call_super_kw calls method_missing
This makes method_missing take a flag for whether keyword arguments
were passed.
Adds tests both for rb_call_super_kw usage as well as general usage
of super calling method_missing in Ruby methods.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2462
Diffstat (limited to 'ext/-test-')
-rw-r--r-- | ext/-test-/rb_call_super_kw/depend | 14 | ||||
-rwxr-xr-x | ext/-test-/rb_call_super_kw/extconf.rb | 1 | ||||
-rw-r--r-- | ext/-test-/rb_call_super_kw/rb_call_super_kw.c | 14 |
3 files changed, 29 insertions, 0 deletions
diff --git a/ext/-test-/rb_call_super_kw/depend b/ext/-test-/rb_call_super_kw/depend new file mode 100644 index 0000000000..f65dcf9694 --- /dev/null +++ b/ext/-test-/rb_call_super_kw/depend @@ -0,0 +1,14 @@ +# AUTOGENERATED DEPENDENCIES START +rb_call_super_kw.o: $(RUBY_EXTCONF_H) +rb_call_super_kw.o: $(arch_hdrdir)/ruby/config.h +rb_call_super_kw.o: $(hdrdir)/ruby.h +rb_call_super_kw.o: $(hdrdir)/ruby/assert.h +rb_call_super_kw.o: $(hdrdir)/ruby/backward.h +rb_call_super_kw.o: $(hdrdir)/ruby/defines.h +rb_call_super_kw.o: $(hdrdir)/ruby/intern.h +rb_call_super_kw.o: $(hdrdir)/ruby/missing.h +rb_call_super_kw.o: $(hdrdir)/ruby/ruby.h +rb_call_super_kw.o: $(hdrdir)/ruby/st.h +rb_call_super_kw.o: $(hdrdir)/ruby/subst.h +rb_call_super_kw.o: rb_call_super_kw.c +# AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/rb_call_super_kw/extconf.rb b/ext/-test-/rb_call_super_kw/extconf.rb new file mode 100755 index 0000000000..c6a5c720d7 --- /dev/null +++ b/ext/-test-/rb_call_super_kw/extconf.rb @@ -0,0 +1 @@ +create_makefile("-test-/rb_call_super_kw") diff --git a/ext/-test-/rb_call_super_kw/rb_call_super_kw.c b/ext/-test-/rb_call_super_kw/rb_call_super_kw.c new file mode 100644 index 0000000000..7f094545d2 --- /dev/null +++ b/ext/-test-/rb_call_super_kw/rb_call_super_kw.c @@ -0,0 +1,14 @@ +#include <ruby.h> + +static VALUE +rb_call_super_kw_m(int argc, VALUE *argv, VALUE self) +{ + return rb_call_super_kw(argc, argv, RB_PASS_CALLED_KEYWORDS); +} + +void +Init_rb_call_super_kw(void) { + VALUE module = rb_define_module("Bug"); + module = rb_define_module_under(module, "RbCallSuperKw"); + rb_define_method(module, "m", rb_call_super_kw_m, -1); +} |