summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-08 13:46:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-08 13:46:53 +0000
commitfdc3882820d425b85082d5b871060aea39e6be81 (patch)
treef66b629ce6616e87490656a82b097d1a9b3624f4 /ext/json
parent63467e52633f90e6a402bce0daf11662ef3e9564 (diff)
* ext/json/generator/generator.c (generate_json_bignum):
add RB_GC_GUARD. http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120407T210301Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json')
-rw-r--r--ext/json/generator/generator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 21fef2b..6eea7ff 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -762,6 +762,7 @@ static void generate_json_bignum(FBuffer *buffer, VALUE Vstate, JSON_Generator_S
{
VALUE tmp = rb_funcall(obj, i_to_s, 0);
fbuffer_append_str(buffer, tmp);
+ RB_GC_GUARD(tmp);
}
static void generate_json_float(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)