diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-24 01:09:29 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-24 01:09:29 +0900 |
| commit | 678cb80033511cbb46df2bdddd42d29d70bc7f7d (patch) | |
| tree | f36b586f6fee10e2884d0621c743b3a76a44d756 /ext | |
| parent | 5a77397489268f27a5d803441d723736a12f59fc (diff) | |
Move `-test-/fatal/rb_fatal` to `-test-/fatal`
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/-test-/fatal/extconf.rb | 3 | ||||
| -rw-r--r-- | ext/-test-/fatal/init.c | 10 | ||||
| -rw-r--r-- | ext/-test-/fatal/rb_fatal.c | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/ext/-test-/fatal/extconf.rb b/ext/-test-/fatal/extconf.rb index d5849c0733..ca51178a18 100644 --- a/ext/-test-/fatal/extconf.rb +++ b/ext/-test-/fatal/extconf.rb @@ -1,2 +1,3 @@ # frozen_string_literal: false -create_makefile("-test-/fatal/rb_fatal") +require_relative "../auto_ext.rb" +auto_ext diff --git a/ext/-test-/fatal/init.c b/ext/-test-/fatal/init.c new file mode 100644 index 0000000000..3b71708789 --- /dev/null +++ b/ext/-test-/fatal/init.c @@ -0,0 +1,10 @@ +#include "ruby.h" + +#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);} + +void +Init_fatal(void) +{ + VALUE klass = rb_define_module("Bug"); + TEST_INIT_FUNCS(init); +} diff --git a/ext/-test-/fatal/rb_fatal.c b/ext/-test-/fatal/rb_fatal.c index eedbc51f8b..6c7bb89628 100644 --- a/ext/-test-/fatal/rb_fatal.c +++ b/ext/-test-/fatal/rb_fatal.c @@ -13,8 +13,7 @@ ruby_fatal(VALUE obj, VALUE msg) } void -Init_rb_fatal(void) +Init_rb_fatal(VALUE mBug) { - VALUE mBug = rb_define_module("Bug"); rb_define_singleton_method(mBug, "rb_fatal", ruby_fatal, 1); } |
