summaryrefslogtreecommitdiff
path: root/ext/json/parser/parser.rl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/parser/parser.rl')
-rw-r--r--ext/json/parser/parser.rl1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
index c96b0a82255..20ecc486e1e 100644
--- a/ext/json/parser/parser.rl
+++ b/ext/json/parser/parser.rl
@@ -705,6 +705,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
source = convert_encoding(StringValue(source));
}
json->current_nesting = 0;
+ StringValue(source);
json->len = RSTRING_LEN(source);
json->source = RSTRING_PTR(source);;
json->Vsource = source;