diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-12-27 17:35:32 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-12-27 17:35:32 +0100 |
commit | 727c97da1977544c91b9b3677811da3a44af7d53 (patch) | |
tree | 4f027117edad10789db57ff4b83242753a89e39d /spec/ruby/optional/capi/ext | |
parent | 267bed0cd91711e2a8c79219e97431ba22137b01 (diff) |
Update to ruby/spec@4ce9f41
Diffstat (limited to 'spec/ruby/optional/capi/ext')
-rw-r--r-- | spec/ruby/optional/capi/ext/binding_spec.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/binding_spec.c b/spec/ruby/optional/capi/ext/binding_spec.c new file mode 100644 index 0000000000..b2e3c88b6d --- /dev/null +++ b/spec/ruby/optional/capi/ext/binding_spec.c @@ -0,0 +1,19 @@ +#include "ruby.h" +#include "rubyspec.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static VALUE binding_spec_get_binding(VALUE self) { + return rb_funcall(self, rb_intern("binding"), 0); +} + +void Init_binding_spec(void) { + VALUE cls = rb_define_class("CApiBindingSpecs", rb_cObject); + rb_define_method(cls, "get_binding", binding_spec_get_binding, 0); +} + +#ifdef __cplusplus +} +#endif |