aboutsummaryrefslogtreecommitdiffstats
path: root/ext/json/parser/parser.rl
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 16:00:49 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 16:00:49 +0000
commit5a00be2bf75939fd3bb05dabbdf46244eaa6bb43 (patch)
tree7a4e8c43342493d270ea16116506295751621c85 /ext/json/parser/parser.rl
parent5f7be3150f0bffb6a958770c61270302123774c3 (diff)
downloadruby-5a00be2bf75939fd3bb05dabbdf46244eaa6bb43.tar.gz
* ext/json: Merge JSON 1.7.1.
https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 c96b0a8225..20ecc486e1 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;