diff options
Diffstat (limited to 'spec/ruby/shared/string/end_with.rb')
-rw-r--r-- | spec/ruby/shared/string/end_with.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/shared/string/end_with.rb b/spec/ruby/shared/string/end_with.rb index 0e4c1386e8..94a7f97513 100644 --- a/spec/ruby/shared/string/end_with.rb +++ b/spec/ruby/shared/string/end_with.rb @@ -55,7 +55,7 @@ describe :end_with, shared: true do it "checks that we are starting to match at the head of a character" do "\xC3\xA9".send(@method).should_not.end_with?("\xA9") "\xe3\x81\x82".send(@method).should_not.end_with?("\x82") - "ab".force_encoding("UTF-16BE").send(@method).should_not.end_with?( - "b".force_encoding("UTF-16BE")) + "ab".dup.force_encoding("UTF-16BE").send(@method).should_not.end_with?( + "b".dup.force_encoding("UTF-16BE")) end end |