提交 d2acf8b5 编写于 作者: J Jeremy Kemper

Silence some warnings.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 57b5fb43
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
......
......@@ -49,8 +49,8 @@ def test_negative_differences
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册