diff options
Diffstat (limited to 'spec/ruby/core/string/unpack/a_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/unpack/a_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/string/unpack/a_spec.rb b/spec/ruby/core/string/unpack/a_spec.rb index 3de338e2e1..a68e842e15 100644 --- a/spec/ruby/core/string/unpack/a_spec.rb +++ b/spec/ruby/core/string/unpack/a_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# encoding: binary require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' @@ -31,8 +31,8 @@ describe "String#unpack with format 'A'" do end it "decodes into raw (ascii) string values" do - str = "str".force_encoding('UTF-8').unpack("A*")[0] - str.encoding.name.should == 'ASCII-8BIT' + str = "str".dup.force_encoding('UTF-8').unpack("A*")[0] + str.encoding.should == Encoding::BINARY end end @@ -60,7 +60,7 @@ describe "String#unpack with format 'a'" do it "decodes into raw (ascii) string values" do str = "".unpack("a*")[0] - str.encoding.name.should == 'ASCII-8BIT' + str.encoding.should == Encoding::BINARY end end |
