From d2acf8b548b56966da49bd7f2f92dcfbd5410319 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 18 May 2007 21:16:43 +0000 Subject: Silence some warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/json/encoding.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') 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 -- cgit v1.2.3