From 8a593535e0ed992e645365837aa0f781d326a0b5 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 16 Jan 2020 06:24:51 +0100 Subject: [PATCH] Test if it fails as expected when using not implemented API --- ext/json/ext/generator/generator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c index ae60c4f4..bbb1adec 100644 --- a/ext/json/ext/generator/generator.c +++ b/ext/json/ext/generator/generator.c @@ -1471,6 +1471,7 @@ void Init_generator(void) eNestingError = rb_path2class("JSON::NestingError"); rb_gc_register_mark_object(eGeneratorError); rb_gc_register_mark_object(eNestingError); + rb_obj_infect(eGeneratorError, eNestingError); /* Just to test */ cState = rb_define_class_under(mGenerator, "State", rb_cObject); rb_define_alloc_func(cState, cState_s_allocate);