From e1c8b9f688c56aaedac9466a4343df955b4a67ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 2 Jan 2015 22:13:27 -0300 Subject: [PATCH] Remove deprecated `ActiveSupport::SafeBuffer#prepend` --- activesupport/CHANGELOG.md | 4 ++++ .../active_support/core_ext/string/output_safety.rb | 6 ------ activesupport/test/core_ext/string_ext_test.rb | 10 ---------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index d69e5bb485..cb39c8edd0 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `ActiveSupport::SafeBuffer#prepend`. + + *Rafael Mendonça França* + * Remove deprecated methods at `Kernel`. `silence_stderr`, `silence_stream`, `capture` and `quietly`. diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 231eaedbba..ba8d4acd6d 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -1,6 +1,5 @@ require 'erb' require 'active_support/core_ext/kernel/singleton_class' -require 'active_support/deprecation' class ERB module Util @@ -190,11 +189,6 @@ module ActiveSupport #:nodoc: super(html_escape_interpolated_argument(value)) end - def prepend!(value) - ActiveSupport::Deprecation.deprecation_warning "ActiveSupport::SafeBuffer#prepend!", :prepend - prepend value - end - def +(other) dup.concat(other) end diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 0af207fae9..cdc695f036 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -667,16 +667,6 @@ class OutputSafetyTest < ActiveSupport::TestCase assert_equal other, "<foo>other" end - test "Deprecated #prepend! method is still present" do - other = "other".html_safe - - assert_deprecated do - other.prepend! "" - end - - assert_equal other, "<foo>other" - end - test "Concatting safe onto unsafe yields unsafe" do @other_string = "other"