diff options
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index babb65a924..64e5779b71 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -1,7 +1,12 @@ require 'active_support/json/variable' -require 'active_support/json/encoders/object' # Require this file explicitly for rdoc -Dir[File.dirname(__FILE__) + '/encoders/**/*.rb'].each { |file| require file[0..-4] } +require 'active_support/json/encoders/object' # Require explicitly for rdoc. +Dir["#{File.dirname(__FILE__)}/encoders/**/*.rb"].each do |file| + basename = File.basename(file, '.rb') + unless basename == 'object' + require "active_support/json/encoders/#{basename}" + end +end module ActiveSupport module JSON |