diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-07 07:37:23 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-07 07:37:23 +0000 |
commit | 12085ae85e6fc981aea70241fbd50a3510f8d508 (patch) | |
tree | d9b5142755a2b3a293c8e077b54c8afa0bc0ed71 /ext | |
parent | 81a36188fad08775d1ca0c9e9b2c89f5e80975fe (diff) | |
download | ruby-12085ae85e6fc981aea70241fbd50a3510f8d508.tar.gz ruby-12085ae85e6fc981aea70241fbd50a3510f8d508.tar.xz ruby-12085ae85e6fc981aea70241fbd50a3510f8d508.zip |
* ext/json/lib/json/pure/generator.rb (utf8_to_json):
downcase the result of Unicode escape.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/lib/json/pure/generator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/lib/json/pure/generator.rb b/ext/json/lib/json/pure/generator.rb index 91bdc0ff4..b44e42ac4 100644 --- a/ext/json/lib/json/pure/generator.rb +++ b/ext/json/lib/json/pure/generator.rb @@ -52,7 +52,7 @@ module JSON )/nx) { |c| c.size == 1 and raise GeneratorError, "invalid utf8 byte: '#{c}'" c = c.unpack("U*")[0] - c > 0xFFFF ? ('\uD%03X\uD%03X' % [0x7C0+c/1024, 0xC00+c%1024]) : ('\u%04X'%c) + c > 0xFFFF ? ('\ud%03x\ud%03x' % [0x7C0+c/1024, 0xC00+c%1024]) : ('\u%04x'%c) } string end |