Changeset 8505
- Timestamp:
- 12/28/07 18:37:17 (2 years ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/json/decoding.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r8454 r8505 1 1 *SVN* 2 3 * remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml when dealing with date/time values. [rick] 2 4 3 5 * Hash#symbolize_keys skips keys that can't be symbolized. #10500 [Brad Greenlee] trunk/activesupport/lib/active_support/json/decoding.rb
r8026 r8505 46 46 json.gsub(/\\\//, '/') 47 47 else 48 # FIXME: multiple slow enumerations 49 output = ([0] + marks.map(&:succ)). 50 zip(marks + [json.length]). 51 map { |left, right| json[left..right] }. 52 join(" ") 48 left_pos = [-1].push(*marks) 49 right_pos = marks << json.length 50 output = [] 51 left_pos.each_with_index do |left, i| 52 output << json[left.succ..right_pos[i]] 53 end 54 output = output * " " 55 53 56 times.each { |i| output[i-1] = ' ' } 54 57 output.gsub!(/\\\//, '/')