summaryrefslogtreecommitdiff
path: root/ext/-test-/fatal/rb_fatal.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-08 19:07:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-09 22:38:06 +0900
commit590dc06e3840cc7b00d80ccaac9fbf42573428f8 (patch)
treee5f6aa316246401b8d89e7419ddf0976238c04b5 /ext/-test-/fatal/rb_fatal.c
parent161a20df28dd09ff35a32a7e2b7ce6cab7079707 (diff)
Get rid of defining methods for tests in core classes
Not to interfere in other tests.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4043
Diffstat (limited to 'ext/-test-/fatal/rb_fatal.c')
-rw-r--r--ext/-test-/fatal/rb_fatal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/-test-/fatal/rb_fatal.c b/ext/-test-/fatal/rb_fatal.c
index 71aef46..eedbc51 100644
--- a/ext/-test-/fatal/rb_fatal.c
+++ b/ext/-test-/fatal/rb_fatal.c
@@ -15,5 +15,6 @@ ruby_fatal(VALUE obj, VALUE msg)
void
Init_rb_fatal(void)
{
- rb_define_method(rb_mKernel, "rb_fatal", ruby_fatal, 1);
+ VALUE mBug = rb_define_module("Bug");
+ rb_define_singleton_method(mBug, "rb_fatal", ruby_fatal, 1);
}