From 1daf775db96412d0a7fc3905d470846a59a9ecbe Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 8 Oct 2008 06:01:48 +0000 Subject: * ext/json/lib/json/pure/parser.rb (JSON::Pure::Parser#parse_string): force_encoding("UTF-8"). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/json/lib/json/pure/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/json/lib/json/pure/parser.rb b/ext/json/lib/json/pure/parser.rb index a0ab3075f..9c3fea91d 100644 --- a/ext/json/lib/json/pure/parser.rb +++ b/ext/json/lib/json/pure/parser.rb @@ -146,7 +146,7 @@ module JSON raise JSON::ParserError, "partial character in source" if stack res.pack("U*") end - end + end.force_encoding("UTF-8") else UNPARSED end -- cgit