|
21 | 21 | str = "あ"
|
22 | 22 | encoded = str.encode
|
23 | 23 | encoded.should_not equal(str)
|
24 |
| - encoded.should eql(str) |
| 24 | + encoded.should == str |
25 | 25 | end
|
26 | 26 |
|
27 | 27 | it "returns a copy for a ASCII-only String when Encoding.default_internal is nil" do
|
28 | 28 | Encoding.default_internal = nil
|
29 | 29 | str = "abc"
|
30 | 30 | encoded = str.encode
|
31 | 31 | encoded.should_not equal(str)
|
32 |
| - encoded.should eql(str) |
| 32 | + encoded.should == str |
33 | 33 | end
|
34 | 34 |
|
35 | 35 | it "encodes an ascii substring of a binary string to UTF-8" do
|
|
45 | 45 | str = "あ"
|
46 | 46 | encoded = str.encode(Encoding::UTF_8)
|
47 | 47 | encoded.should_not equal(str)
|
48 |
| - encoded.should eql(str) |
| 48 | + encoded.should == str |
49 | 49 | end
|
50 | 50 |
|
51 | 51 | it "round trips a String" do
|
|
81 | 81 | encoded = str.encode("utf-8", "utf-8")
|
82 | 82 |
|
83 | 83 | encoded.should_not equal(str)
|
84 |
| - encoded.should eql(str.force_encoding("utf-8")) |
| 84 | + encoded.should == str.force_encoding("utf-8") |
85 | 85 | encoded.encoding.should == Encoding::UTF_8
|
86 | 86 | end
|
87 | 87 |
|
|
96 | 96 | str = "あ"
|
97 | 97 | encoded = str.encode(Encoding::UTF_8, undef: :replace)
|
98 | 98 | encoded.should_not equal(str)
|
99 |
| - encoded.should eql(str) |
| 99 | + encoded.should == str |
100 | 100 | end
|
101 | 101 | end
|
102 | 102 |
|
|
105 | 105 | str = "あ"
|
106 | 106 | encoded = str.encode("utf-8", "utf-8", invalid: :replace)
|
107 | 107 | encoded.should_not equal(str)
|
108 |
| - encoded.should eql(str) |
| 108 | + encoded.should == str |
109 | 109 | end
|
110 | 110 |
|
111 | 111 | it "returns a copy in the destination encoding when both encodings are the same" do
|
|
114 | 114 | encoded = str.encode("utf-8", "utf-8", invalid: :replace)
|
115 | 115 |
|
116 | 116 | encoded.should_not equal(str)
|
117 |
| - encoded.should eql(str.force_encoding("utf-8")) |
| 117 | + encoded.should == str.force_encoding("utf-8") |
118 | 118 | encoded.encoding.should == Encoding::UTF_8
|
119 | 119 | end
|
120 | 120 | end
|
|
0 commit comments