Skip to content

Commit 061ab63

Browse files
committed
[GR-45621] Add a deprecation warning for Encoding#replicate.
PullRequest: truffleruby/4146
2 parents 3c22d4a + 161775a commit 061ab63

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
@@ -47,6 +47,7 @@ Compatibility:
4747
* Promote `Set` class to core library (#3039, @andrykonchin).
4848
* Support `connect_timeout` keyword argument to `TCPSocket.{new,open}` (#3421, @manefz, @patricklinpl, @nirvdrum, @rwstauner).
4949
* Add `File.lutime` and `Pathname#lutime` methods (#3039, @andrykonchin).
50+
* Add a deprecation warning for `Encoding#replicate` (#3039, @patricklinpl, @manefz, @nirvdrum).
5051

5152
Performance:
5253

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)