Changeset 7678
- Timestamp:
- 09/29/07 21:27:29 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/lib/active_support/json/decoding.rb
r7613 r7678 46 46 json 47 47 else 48 ranges = ([0] + marks.map(&:succ)).zip(marks + [json.length]) 49 output = ranges.collect! { |(left, right)| json[left..right] }.join(" ") 50 times.each do |pos| 51 output[pos-1] = ' ' 52 end 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(" ") 53 times.each { |pos| output[pos-1] = ' ' } 53 54 output 54 55 end