From caf78564c295e2a8c0326b8eb864f35d4f873f26 Mon Sep 17 00:00:00 2001 From: kennyj Date: Sun, 22 Jan 2012 04:40:09 +0900 Subject: Fix GH #4580. Rails 3.2: uninitialized constant ActiveSupport::TaggedLogging::ERROR --- activesupport/lib/active_support/tagged_logging.rb | 2 +- activesupport/test/tagged_logging_test.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index 2fad91495d..d71215b447 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -27,7 +27,7 @@ module ActiveSupport new_tags.size.times { tags.pop } end - def silence(temporary_level = ERROR, &block) + def silence(temporary_level = Logger::ERROR, &block) @logger.silence(temporary_level, &block) end deprecate :silence diff --git a/activesupport/test/tagged_logging_test.rb b/activesupport/test/tagged_logging_test.rb index 17c4214dfc..dbf8a71e9a 100644 --- a/activesupport/test/tagged_logging_test.rb +++ b/activesupport/test/tagged_logging_test.rb @@ -64,4 +64,8 @@ class TaggedLoggingTest < ActiveSupport::TestCase assert_equal "[BCX] [Jason] Funky time\n[BCX] Junky time!\n", @output.string end + + test "silence" do + assert_nothing_raised { @logger.silence {} } + end end -- cgit v1.2.3