mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
Check -1 arity for C++
This commit is contained in:
parent
f9d20a1bf1
commit
a93d0a4e62
4 changed files with 24 additions and 6 deletions
13
ext/-test-/cxxanyargs/failurem1.cpp
Normal file
13
ext/-test-/cxxanyargs/failurem1.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <ruby/ruby.h>
|
||||
|
||||
static VALUE
|
||||
func_argm1(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
return argc > 0 ? argv[0] : Qnil;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
Init_failure(void)
|
||||
{
|
||||
rb_define_method(rb_cObject, "argm1", func_argm1, 0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue