aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-05-18 21:16:43 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-05-18 21:16:43 +0000
commitd2acf8b548b56966da49bd7f2f92dcfbd5410319 (patch)
treedc11222862e1dea8cc673c45b1be9f71239d996c /activesupport/lib/active_support
parent57b5fb43efc1fd990f36e5b6a6a2f2c15cc480f1 (diff)
downloadrails-d2acf8b548b56966da49bd7f2f92dcfbd5410319.tar.gz
rails-d2acf8b548b56966da49bd7f2f92dcfbd5410319.tar.bz2
rails-d2acf8b548b56966da49bd7f2f92dcfbd5410319.zip
Silence some warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/json/encoding.rb9
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