diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-11-06 10:26:02 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-11-06 10:26:02 -0800 |
commit | 0f5a36eb4c344ab84d45adc76239a9bd82b87684 (patch) | |
tree | 912c2a18d3fd91292f48515f818965cdb90695c7 /actionpack/lib | |
parent | aeaf3a9d0094d527f6f79ba48747bb2b28c9d30a (diff) | |
parent | ff1192fea40c55a11c52e26f22a814d68d058170 (diff) | |
download | rails-0f5a36eb4c344ab84d45adc76239a9bd82b87684.tar.gz rails-0f5a36eb4c344ab84d45adc76239a9bd82b87684.tar.bz2 rails-0f5a36eb4c344ab84d45adc76239a9bd82b87684.zip |
Merge pull request #12783 from chancancode/eliminate_direct_json_gem_use
Eliminate `JSON.{parse,load,generate,dump}` and `def to_json`
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/gtg/transition_table.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb index 971cb3447f..5a79059ed6 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb @@ -43,9 +43,7 @@ module ActionDispatch move_string(t, a).concat(move_regexp(t, a)) end - def to_json - require 'json' - + def as_json(options = nil) simple_regexp = Hash.new { |h,k| h[k] = {} } @regexp_states.each do |from, hash| @@ -54,11 +52,11 @@ module ActionDispatch end end - JSON.dump({ + { regexp_states: simple_regexp, string_states: @string_states, accepting: @accepting - }) + } end def to_svg |