mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@94d98ff
This commit is contained in:
parent
632a97227e
commit
a2091c3023
10 changed files with 18 additions and 18 deletions
|
@ -676,7 +676,7 @@ describe :rb_external_str_new, shared: true do
|
|||
@s.send(@method, "abc").encoding.should == Encoding::UTF_8
|
||||
end
|
||||
|
||||
it "returns an BINARY encoded string if any non-ascii bytes are present and default external is US-ASCII" do
|
||||
it "returns a binary encoded string if any non-ascii bytes are present and default external is US-ASCII" do
|
||||
Encoding.default_external = "US-ASCII"
|
||||
x80 = [0x80].pack('C')
|
||||
@s.send(@method, "#{x80}abc").encoding.should == Encoding::BINARY
|
||||
|
@ -735,7 +735,7 @@ describe "C-API String function" do
|
|||
s.encoding.should == Encoding::UTF_8
|
||||
end
|
||||
|
||||
it "returns an BINARY encoded String if any non-ascii bytes are present and the specified encoding is US-ASCII" do
|
||||
it "returns a binary encoded String if any non-ascii bytes are present and the specified encoding is US-ASCII" do
|
||||
x80 = [0x80].pack('C')
|
||||
s = @s.rb_external_str_new_with_enc("#{x80}abc", 4, Encoding::US_ASCII)
|
||||
s.encoding.should == Encoding::BINARY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue