diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-08 06:01:48 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-08 06:01:48 +0000 |
commit | 87259f9a5f19eb5c568079c33360e5fd15772938 (patch) | |
tree | 994373543b3a7e0df5d8cb31b000d7effeef820d | |
parent | ccf184d9e472998365d2bd009557919dd4c00a68 (diff) | |
download | ruby-87259f9a5f19eb5c568079c33360e5fd15772938.tar.gz |
* ext/json/lib/json/pure/parser.rb
(JSON::Pure::Parser#parse_string): force_encoding("UTF-8").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/json/lib/json/pure/parser.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Oct 8 15:00:22 2008 NARUSE, Yui <naruse@ruby-lang.org> + + * ext/json/lib/json/pure/parser.rb + (JSON::Pure::Parser#parse_string): force_encoding("UTF-8"). + Wed Oct 8 11:56:15 2008 NARUSE, Yui <naruse@ruby-lang.org> * lib/test/unit/assertions.rb: assert_nothing_thrown, diff --git a/ext/json/lib/json/pure/parser.rb b/ext/json/lib/json/pure/parser.rb index a0ab3075fe..9c3fea91da 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 |