diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2013-11-06 18:11:39 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2013-11-06 18:18:06 -0800 |
commit | 0b7c6d58c0423d777bde7b69126e2e10c6745137 (patch) | |
tree | 93294b06b608a6464677969c4bdec513acab8604 /activesupport | |
parent | 240863a1680bbb7da00bac68e8aa1ee996bcdb57 (diff) | |
download | rails-0b7c6d58c0423d777bde7b69126e2e10c6745137.tar.gz rails-0b7c6d58c0423d777bde7b69126e2e10c6745137.tar.bz2 rails-0b7c6d58c0423d777bde7b69126e2e10c6745137.zip |
Move the JSON extension require statements to the right place.
In #12203, the JSON core extensions were moved into the `core_ext`
folder. Unfortunately, there are some corresponding requires that
were left behind. The problem is partially addressed in #12710, this
commit fixes the rest.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/json.rb | 7 | ||||
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 34b76e228a..7c8daebd3d 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -1,7 +1,14 @@ # Hack to load json gem first so we can overwrite its to_json. require 'json' require 'bigdecimal' +require 'active_support/core_ext/big_decimal/conversions' # for #to_s +require 'active_support/core_ext/hash/except' +require 'active_support/core_ext/hash/slice' +require 'active_support/core_ext/object/instance_variables' require 'time' +require 'active_support/core_ext/time/conversions' +require 'active_support/core_ext/date_time/conversions' +require 'active_support/core_ext/date/conversions' # The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting # their default behavior. That said, we need to define the basic to_json method in all of them, diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index c9840e9faa..0e1c379b5b 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -3,14 +3,6 @@ require 'active_support/core_ext/object/json' require 'active_support/core_ext/module/delegation' -require 'active_support/core_ext/big_decimal/conversions' # for #to_s -require 'active_support/core_ext/hash/except' -require 'active_support/core_ext/hash/slice' -require 'active_support/core_ext/object/instance_variables' -require 'active_support/core_ext/time/conversions' -require 'active_support/core_ext/date_time/conversions' -require 'active_support/core_ext/date/conversions' - module ActiveSupport class << self delegate :use_standard_json_time_format, :use_standard_json_time_format=, |