1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-03-28 00:22:51 +01:00
parent 296f68816c
commit f234d51eab
50 changed files with 739 additions and 377 deletions

View file

@ -257,6 +257,14 @@ describe "C-API Encoding function" do
@s.rb_to_encoding(obj).should == "UTF-8"
end
describe "when the rb_encoding struct is stored in native memory" do
it "can still read the name of the encoding" do
address = @s.rb_to_encoding_native_store(Encoding::UTF_8)
address.should be_kind_of(Integer)
@s.rb_to_encoding_native_name(address).should == "UTF-8"
end
end
end
describe "rb_to_encoding_index" do