summaryrefslogtreecommitdiff
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authorShugo Maeda <shugo@ruby-lang.org>2023-01-19 17:13:07 +0900
committerShugo Maeda <shugo@ruby-lang.org>2023-01-19 17:13:07 +0900
commitf7b72462aa27716370c6bea1f2c240983aca9a55 (patch)
treeb438a7eeb06a0bd884b654d069c3a11bc9de282b /test/ruby/test_string.rb
parent4b42392f8ef66890359f128f0c934601c55a014f (diff)
String#bytesplice should return self
In Feature #19314, we concluded that the return value of String#bytesplice should be changed from the source string to the receiver, because the source string is useless and confusing when extra arguments are added. This change should be included in Ruby 3.2.1.
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index e34fd116c9..2e66521df7 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -3489,7 +3489,7 @@ CODE
private
def assert_bytesplice_result(expected, s, *args)
- assert_equal(args.last, s.send(:bytesplice, *args))
+ assert_equal(expected, s.send(:bytesplice, *args))
assert_equal(expected, s)
end