Skip to content
This repository
Browse code

Remove untested part from 9b9b293

  • Loading branch information...
commit affe50105f7027a44eb6e9cfb56f5b3fc070b19b 1 parent 9b9b293
Pratik authored March 10, 2009
12  activesupport/lib/active_support/json/decoding.rb
@@ -58,16 +58,8 @@ def convert_json_to_yaml(json) #:nodoc:
58 58
             right_pos = marks << scanner.pos + scanner.rest_size
59 59
             output    = []
60 60
             left_pos.each_with_index do |left, i|
61  
-              output << json[left.succ..right_pos[i]].gsub(/\\([\\\/]|u[[:xdigit:]]{4})/) do
62  
-                ustr = $1
63  
-                if ustr.starts_with?('u')
64  
-                  [ustr[1..-1].to_i(16)].pack("U")
65  
-                elsif ustr == '\\'
66  
-                '\\\\'
67  
-                else
68  
-                  ustr
69  
-                end
70  
-              end
  61
+              scanner.pos = left.succ
  62
+              output << scanner.peek(right_pos[i] - scanner.pos + 1)
71 63
             end
72 64
             output = output * " "
73 65
             

0 notes on commit affe501

Please sign in to comment.
Something went wrong with that request. Please try again.