Skip to content

Commit 161775a

Browse files
manefzpatricklinplnirvdrum
committed
Add a deprecation warning for Encoding#replicate.
Co-authored-by: Patrick Lin <patrick.lin@shopify.com> Co-authored-by: Kevin Menard <kevin.menard@shopify.com>
1 parent 90bfaa0 commit 161775a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Compatibility:
4444
* Do not autosplat a proc that accepts a single positional argument and keywords (#3039, @andrykonchin).
4545
* Support passing anonymous * and ** parameters as method call arguments (#3039, @andrykonchin).
4646
* Handle either positional or keywords arguments by default in `Struct.new` (#3039, @rwstauner).
47+
* Add a deprecation warning for `Encoding#replicate` (#3039, @patricklinpl, @manefz, @nirvdrum).
4748

4849
Performance:
4950

spec/tags/core/encoding/replicate_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/ruby/truffleruby/core/encoding.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ def names
139139
end
140140

141141
def replicate(name)
142+
warn 'Encoding#replicate is deprecated and will be removed in Ruby 3.3; use the original encoding instead', category: :deprecated, uplevel: 1
143+
142144
Truffle::EncodingOperations.replicate_encoding(self, name)
143145
end
144146

0 commit comments

Comments
 (0)