diff options
author | Peter Zhu <[email protected]> | 2024-10-17 13:39:48 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-10-17 13:39:48 -0400 |
commit | e4330536d2f4a9b96e52a60b9d698625ab26a547 (patch) | |
tree | a512489f704ed5cb17d5d162c64c114396cfcb17 | |
parent | c6828a10ff6fd57a7e909438a4ff18ffcd9ce4ec (diff) |
[ruby/json] Fix State#max_nesting=
Returning state->max_nesting is not valid because it's not a Ruby object.
https://github.com/ruby/json/commit/6679ceb
-rw-r--r-- | ext/json/generator/generator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index b9946b3cf7..ead772994b 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -1164,7 +1164,8 @@ static VALUE cState_max_nesting_set(VALUE self, VALUE depth) { GET_STATE(self); Check_Type(depth, T_FIXNUM); - return state->max_nesting = FIX2LONG(depth); + state->max_nesting = FIX2LONG(depth); + return Qnil; } /* |