Skip to content

Commit 68825d1

Browse files
committed
[GR-19220] Update eql? to == in String#encode spec
PullRequest: truffleruby/1977
2 parents 983a39e + 6f8f90b commit 68825d1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/ruby/core/string/encode_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
str = "あ"
2222
encoded = str.encode
2323
encoded.should_not equal(str)
24-
encoded.should eql(str)
24+
encoded.should == str
2525
end
2626

2727
it "returns a copy for a ASCII-only String when Encoding.default_internal is nil" do
2828
Encoding.default_internal = nil
2929
str = "abc"
3030
encoded = str.encode
3131
encoded.should_not equal(str)
32-
encoded.should eql(str)
32+
encoded.should == str
3333
end
3434

3535
it "encodes an ascii substring of a binary string to UTF-8" do
@@ -45,7 +45,7 @@
4545
str = "あ"
4646
encoded = str.encode(Encoding::UTF_8)
4747
encoded.should_not equal(str)
48-
encoded.should eql(str)
48+
encoded.should == str
4949
end
5050

5151
it "round trips a String" do
@@ -81,7 +81,7 @@
8181
encoded = str.encode("utf-8", "utf-8")
8282

8383
encoded.should_not equal(str)
84-
encoded.should eql(str.force_encoding("utf-8"))
84+
encoded.should == str.force_encoding("utf-8")
8585
encoded.encoding.should == Encoding::UTF_8
8686
end
8787

@@ -96,7 +96,7 @@
9696
str = "あ"
9797
encoded = str.encode(Encoding::UTF_8, undef: :replace)
9898
encoded.should_not equal(str)
99-
encoded.should eql(str)
99+
encoded.should == str
100100
end
101101
end
102102

@@ -105,7 +105,7 @@
105105
str = "あ"
106106
encoded = str.encode("utf-8", "utf-8", invalid: :replace)
107107
encoded.should_not equal(str)
108-
encoded.should eql(str)
108+
encoded.should == str
109109
end
110110

111111
it "returns a copy in the destination encoding when both encodings are the same" do
@@ -114,7 +114,7 @@
114114
encoded = str.encode("utf-8", "utf-8", invalid: :replace)
115115

116116
encoded.should_not equal(str)
117-
encoded.should eql(str.force_encoding("utf-8"))
117+
encoded.should == str.force_encoding("utf-8")
118118
encoded.encoding.should == Encoding::UTF_8
119119
end
120120
end

0 commit comments

Comments
 (0)