dewski/json_builder — pull request #34 by jrallison (2012-09-03 05:57:39+00:00)
Title: Re-introduce escaping of tabs.

I ran into a problem upgrading to the latest version of json_builder. A recent [commit](https://github.com/dewski/json_builder/commit/ea0969934da6ccddde717e3d6ba4bb6b12f01704) refactored `String#json_escape`, and removed escaping of tabs.

The result:

irb> val = "a\tb"
=> "a\tb"
irb> j = JSONBuilder::Compiler.generate { v val }
=> "{\"v\": \"a\tb\"}"
irb> JSON.parse j
JSON::ParserError: 757: unexpected token at '{"v": "a	b"}'
from /Users/jrallison/.rbenv/versions/1.9.3-p194-perf/gemsets/customerio/gems/json_pure-1.7.4/lib/json/common.rb:155:in `parse'
from /Users/jrallison/.rbenv/versions/1.9.3-p194-perf/gemsets/customerio/gems/json_pure-1.7.4/lib/json/common.rb:155:in `parse'
from (irb):6
from /Users/jrallison/.rbenv/versions/1.9.3-p194-perf/gemsets/customerio/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
from /Users/jrallison/.rbenv/versions/1.9.3-p194-perf/gemsets/customerio/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start'
from /Users/jrallison/.rbenv/versions/1.9.3-p194-perf/gemsets/customerio/gems/railties-3.2.2/lib/rails/commands.rb:41:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'

This pull request adds back tab escaping.