diff options
Diffstat (limited to 'spec/ruby/shared/string')
| -rw-r--r-- | spec/ruby/shared/string/end_with.rb | 4 | ||||
| -rw-r--r-- | spec/ruby/shared/string/times.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/shared/string/end_with.rb b/spec/ruby/shared/string/end_with.rb index 94a7f97513..08f43c1bce 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".dup.force_encoding("UTF-16BE").send(@method).should_not.end_with?( - "b".dup.force_encoding("UTF-16BE")) + "\xd8\x00\xdc\x00".dup.force_encoding("UTF-16BE").send(@method).should_not.end_with?( + "\xdc\x00".dup.force_encoding("UTF-16BE")) end end diff --git a/spec/ruby/shared/string/times.rb b/spec/ruby/shared/string/times.rb index aaf748bad9..4814f894cf 100644 --- a/spec/ruby/shared/string/times.rb +++ b/spec/ruby/shared/string/times.rb @@ -44,13 +44,13 @@ describe :string_times, shared: true do result.encoding.should equal(Encoding::UTF_8) end - platform_is wordsize: 32 do + platform_is c_long_size: 32 do it "raises an ArgumentError if the length of the resulting string doesn't fit into a long" do -> { @object.call("abc", (2 ** 31) - 1) }.should raise_error(ArgumentError) end end - platform_is wordsize: 64 do + platform_is c_long_size: 64 do it "raises an ArgumentError if the length of the resulting string doesn't fit into a long" do -> { @object.call("abc", (2 ** 63) - 1) }.should raise_error(ArgumentError) end |
