summaryrefslogtreecommitdiff
path: root/ext/json/lib/json/pure
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-20 17:41:14 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-20 17:41:14 +0000
commite8eb95ec33334f40f3f3bbcbf16404aee07dfa8e (patch)
treec7fade34f792e138365b59af246ea316616c04e7 /ext/json/lib/json/pure
parenta91cd48aa19dd31ec5abb6e4b982f2077bedcbcd (diff)
* ext/json: import JSON v 1.1.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/lib/json/pure')
-rw-r--r--ext/json/lib/json/pure/parser.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/json/lib/json/pure/parser.rb b/ext/json/lib/json/pure/parser.rb
index 39bee54269..9b30f15c07 100644
--- a/ext/json/lib/json/pure/parser.rb
+++ b/ext/json/lib/json/pure/parser.rb
@@ -122,9 +122,8 @@ module JSON
def parse_string
if scan(STRING)
return '' if self[1].empty?
- self[1].gsub(%r((?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff]))n) do
- c = $&
- if u = UNESCAPE_MAP[c[1]]
+ self[1].gsub(%r((?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff]))n) do |c|
+ if u = UNESCAPE_MAP[$&[1]]
u
else # \uXXXX
bytes = ''