diff options
author | Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com> | 2021-10-25 15:48:18 +0300 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-05-24 09:37:30 +0900 |
commit | 12dfd9d1c980d17d8a0ea10bccb9cd7eca21b568 (patch) | |
tree | 390dd14b8632a6425a4fab8ac6958eee84c78088 /ext/json | |
parent | 28056a6d161417bd7b3aed8099f59f4ac164b351 (diff) |
[flori/json] Call `super` in `included` hook
The C extension defines an `included` hook for the
`JSON::Ext::Generator::GeneratorMethods::String` module but neglects to
call `super` in the hook. This can break the functionality of various
other code that rely on the fact that `included` on `Module` will always
be called.
https://github.com/flori/json/commit/cd8bbe56a3
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/generator/generator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index 98d0ea46c3..8f7c57e042 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -478,6 +478,7 @@ static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self) */ static VALUE mString_included_s(VALUE self, VALUE modul) { VALUE result = rb_funcall(modul, i_extend, 1, mString_Extend); + rb_call_super(1, &modul); return result; } |