Skip to content

Commit e1c8b9f

Browse files
committed
Remove deprecated ActiveSupport::SafeBuffer#prepend
1 parent 481e49c commit e1c8b9f

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

activesupport/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `ActiveSupport::SafeBuffer#prepend`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated methods at `Kernel`.
26

37
`silence_stderr`, `silence_stream`, `capture` and `quietly`.

activesupport/lib/active_support/core_ext/string/output_safety.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'erb'
22
require 'active_support/core_ext/kernel/singleton_class'
3-
require 'active_support/deprecation'
43

54
class ERB
65
module Util
@@ -190,11 +189,6 @@ def prepend(value)
190189
super(html_escape_interpolated_argument(value))
191190
end
192191

193-
def prepend!(value)
194-
ActiveSupport::Deprecation.deprecation_warning "ActiveSupport::SafeBuffer#prepend!", :prepend
195-
prepend value
196-
end
197-
198192
def +(other)
199193
dup.concat(other)
200194
end

activesupport/test/core_ext/string_ext_test.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,6 @@ def to_s
667667
assert_equal other, "<foo>other"
668668
end
669669

670-
test "Deprecated #prepend! method is still present" do
671-
other = "other".html_safe
672-
673-
assert_deprecated do
674-
other.prepend! "<foo>"
675-
end
676-
677-
assert_equal other, "&lt;foo&gt;other"
678-
end
679-
680670
test "Concatting safe onto unsafe yields unsafe" do
681671
@other_string = "other"
682672

0 commit comments

Comments
 (0)