summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/dump_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/dump_spec.rb')
-rw-r--r--spec/ruby/core/string/dump_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/string/dump_spec.rb b/spec/ruby/core/string/dump_spec.rb
index 503848221c..cfe7bea6f0 100644
--- a/spec/ruby/core/string/dump_spec.rb
+++ b/spec/ruby/core/string/dump_spec.rb
@@ -418,7 +418,7 @@ describe "String#dump" do
end
it "includes .force_encoding(name) if the encoding isn't ASCII compatible" do
- "\u{876}".encode('utf-16be').dump.should == "\"\\bv\".force_encoding(\"UTF-16BE\")"
- "\u{876}".encode('utf-16le').dump.should == "\"v\\b\".force_encoding(\"UTF-16LE\")"
+ "\u{876}".encode('utf-16be').dump.end_with?(".force_encoding(\"UTF-16BE\")").should be_true
+ "\u{876}".encode('utf-16le').dump.end_with?(".force_encoding(\"UTF-16LE\")").should be_true
end
end