diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-18 21:16:43 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-18 21:16:43 +0000 |
commit | d2acf8b548b56966da49bd7f2f92dcfbd5410319 (patch) | |
tree | dc11222862e1dea8cc673c45b1be9f71239d996c | |
parent | 57b5fb43efc1fd990f36e5b6a6a2f2c15cc480f1 (diff) | |
download | rails-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
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 9 | ||||
-rw-r--r-- | activesupport/test/test_test.rb | 4 |
2 files changed, 9 insertions, 4 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 diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index e29534ccaf..b1d916d5c0 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -49,8 +49,8 @@ class AssertDifferenceTest < Test::Unit::TestCase def test_expression_is_evaluated_in_the_appropriate_scope local_scope = 'foo' - assert_difference 'local_scope; @object.num' do - @object.increment + silence_warnings do + assert_difference('local_scope; @object.num') { @object.increment } end end end |