1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Ensure that unmatched arity fails in C++

This commit is contained in:
Nobuyoshi Nakada 2019-09-19 20:07:24 +09:00
parent b3ddeac33e
commit a3daf8e49a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,13 @@
#include <ruby/ruby.h>
static VALUE
func_arg1(VALUE self, VALUE arg1)
{
return arg1;
}
extern "C" void
Init_failure(void)
{
rb_define_method(rb_cObject, "arg1", func_arg1, 0);
}