We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rb_str_export_to_enc
1 parent ff1ba50 commit 0dbbe9bCopy full SHA for 0dbbe9b
spec/ruby/optional/capi/string_spec.rb
@@ -882,12 +882,13 @@ def inspect
882
source = "A simple string".encode(Encoding::US_ASCII)
883
result = @s.rb_str_export_to_enc(source, Encoding::UTF_8)
884
result.should == source.encode(Encoding::UTF_8)
885
+ result.encoding.should == Encoding::UTF_8
886
end
887
888
it "returns the source string if it can not be converted" do
889
source = ["00ff"].pack("H*");
890
- result.should == source
891
+ result.should.equal?(source)
892
893
894
it "does not alter the source string if it can not be converted" do
0 commit comments