diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-03-10 18:16:10 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-10 18:16:10 +0000 |
commit | affe50105f7027a44eb6e9cfb56f5b3fc070b19b (patch) | |
tree | 9728c6fd14a5660060d2aa284f336999a4628d9c /activesupport/lib | |
parent | 9b9b2937ce3bef3bca9d22821e76c40cc74fa689 (diff) | |
download | rails-affe50105f7027a44eb6e9cfb56f5b3fc070b19b.tar.gz rails-affe50105f7027a44eb6e9cfb56f5b3fc070b19b.tar.bz2 rails-affe50105f7027a44eb6e9cfb56f5b3fc070b19b.zip |
Remove untested part from 9b9b2937ce3bef3bca9d22821e76c40cc74fa689
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/json/decoding.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index ed64c3117b..198f3fd624 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -58,16 +58,8 @@ module ActiveSupport right_pos = marks << scanner.pos + scanner.rest_size output = [] left_pos.each_with_index do |left, i| - output << json[left.succ..right_pos[i]].gsub(/\\([\\\/]|u[[:xdigit:]]{4})/) do - ustr = $1 - if ustr.starts_with?('u') - [ustr[1..-1].to_i(16)].pack("U") - elsif ustr == '\\' - '\\\\' - else - ustr - end - end + scanner.pos = left.succ + output << scanner.peek(right_pos[i] - scanner.pos + 1) end output = output * " " |