summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/json/lib/json/pure/parser.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 973a41c..a635c54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 a0ab307..9c3fea9 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