diff options
Diffstat (limited to 'spec/ruby/core/array/pack')
-rw-r--r-- | spec/ruby/core/array/pack/a_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/at_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/b_spec.rb | 10 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/buffer_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/c_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/comment_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/h_spec.rb | 10 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/m_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/shared/float.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/shared/integer.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/shared/numeric_basic.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/shared/string.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/u_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/w_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/x_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/array/pack/z_spec.rb | 2 |
16 files changed, 31 insertions, 31 deletions
diff --git a/spec/ruby/core/array/pack/a_spec.rb b/spec/ruby/core/array/pack/a_spec.rb index 1cee3858ff..7af7a16c68 100644 --- a/spec/ruby/core/array/pack/a_spec.rb +++ b/spec/ruby/core/array/pack/a_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' diff --git a/spec/ruby/core/array/pack/at_spec.rb b/spec/ruby/core/array/pack/at_spec.rb index 00763c70f1..3942677913 100644 --- a/spec/ruby/core/array/pack/at_spec.rb +++ b/spec/ruby/core/array/pack/at_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' diff --git a/spec/ruby/core/array/pack/b_spec.rb b/spec/ruby/core/array/pack/b_spec.rb index 8a75825e3e..759aec13d1 100644 --- a/spec/ruby/core/array/pack/b_spec.rb +++ b/spec/ruby/core/array/pack/b_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' @@ -47,8 +47,8 @@ describe "Array#pack with format 'B'" do ].should be_computed_by(:pack, "B*") end - it "returns an ASCII-8BIT string" do - ["1"].pack("B").encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + ["1"].pack("B").encoding.should == Encoding::BINARY end it "encodes the string as a sequence of bytes" do @@ -98,8 +98,8 @@ describe "Array#pack with format 'b'" do ].should be_computed_by(:pack, "b*") end - it "returns an ASCII-8BIT string" do - ["1"].pack("b").encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + ["1"].pack("b").encoding.should == Encoding::BINARY end it "encodes the string as a sequence of bytes" do diff --git a/spec/ruby/core/array/pack/buffer_spec.rb b/spec/ruby/core/array/pack/buffer_spec.rb index 28b317eacb..a3a582996a 100644 --- a/spec/ruby/core/array/pack/buffer_spec.rb +++ b/spec/ruby/core/array/pack/buffer_spec.rb @@ -1,4 +1,4 @@ -# encoding: ascii-8bit +# encoding: binary require_relative '../../../spec_helper' diff --git a/spec/ruby/core/array/pack/c_spec.rb b/spec/ruby/core/array/pack/c_spec.rb index 225f0970fd..7200830331 100644 --- a/spec/ruby/core/array/pack/c_spec.rb +++ b/spec/ruby/core/array/pack/c_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' diff --git a/spec/ruby/core/array/pack/comment_spec.rb b/spec/ruby/core/array/pack/comment_spec.rb index 07daa2d6fb..254c827ccc 100644 --- a/spec/ruby/core/array/pack/comment_spec.rb +++ b/spec/ruby/core/array/pack/comment_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' diff --git a/spec/ruby/core/array/pack/h_spec.rb b/spec/ruby/core/array/pack/h_spec.rb index 51bf551ba3..81fca7d989 100644 --- a/spec/ruby/core/array/pack/h_spec.rb +++ b/spec/ruby/core/array/pack/h_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' @@ -97,8 +97,8 @@ describe "Array#pack with format 'H'" do ].should be_computed_by(:pack, "H") end - it "returns an ASCII-8BIT string" do - ["41"].pack("H").encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + ["41"].pack("H").encoding.should == Encoding::BINARY end end @@ -194,7 +194,7 @@ describe "Array#pack with format 'h'" do ].should be_computed_by(:pack, "h") end - it "returns an ASCII-8BIT string" do - ["41"].pack("h").encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + ["41"].pack("h").encoding.should == Encoding::BINARY end end diff --git a/spec/ruby/core/array/pack/m_spec.rb b/spec/ruby/core/array/pack/m_spec.rb index 24acf2cef2..40c2e3f1fa 100644 --- a/spec/ruby/core/array/pack/m_spec.rb +++ b/spec/ruby/core/array/pack/m_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' diff --git a/spec/ruby/core/array/pack/shared/float.rb b/spec/ruby/core/array/pack/shared/float.rb index b9864adef5..6cd326ce9c 100644 --- a/spec/ruby/core/array/pack/shared/float.rb +++ b/spec/ruby/core/array/pack/shared/float.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- describe :array_pack_float_le, shared: true do it "encodes a positive Float" do diff --git a/spec/ruby/core/array/pack/shared/integer.rb b/spec/ruby/core/array/pack/shared/integer.rb index 0df03bbfd1..6592f85022 100644 --- a/spec/ruby/core/array/pack/shared/integer.rb +++ b/spec/ruby/core/array/pack/shared/integer.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- describe :array_pack_16bit_le, shared: true do it "encodes the least significant 16 bits of a positive number" do diff --git a/spec/ruby/core/array/pack/shared/numeric_basic.rb b/spec/ruby/core/array/pack/shared/numeric_basic.rb index 9224d6080e..632d259ab8 100644 --- a/spec/ruby/core/array/pack/shared/numeric_basic.rb +++ b/spec/ruby/core/array/pack/shared/numeric_basic.rb @@ -15,9 +15,9 @@ describe :array_pack_numeric_basic, shared: true do lambda { [false].pack(pack_format) }.should raise_error(TypeError) end - it "returns an ASCII-8BIT string" do - [0xFF].pack(pack_format).encoding.should == Encoding::ASCII_8BIT - [0xE3, 0x81, 0x82].pack(pack_format(3)).encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + [0xFF].pack(pack_format).encoding.should == Encoding::BINARY + [0xE3, 0x81, 0x82].pack(pack_format(3)).encoding.should == Encoding::BINARY end end diff --git a/spec/ruby/core/array/pack/shared/string.rb b/spec/ruby/core/array/pack/shared/string.rb index 256c1c08e8..98e8c4d562 100644 --- a/spec/ruby/core/array/pack/shared/string.rb +++ b/spec/ruby/core/array/pack/shared/string.rb @@ -38,11 +38,11 @@ describe :array_pack_string, shared: true do it "returns a string in encoding of common to the concatenated results" do f = pack_format("*") - [ [["\u{3042 3044 3046 3048}", 0x2000B].pack(f+"U"), Encoding::ASCII_8BIT], - [["abcde\xd1", "\xFF\xFe\x81\x82"].pack(f+"u"), Encoding::ASCII_8BIT], - [["a".force_encoding("ascii"), "\xFF\xFe\x81\x82"].pack(f+"u"), Encoding::ASCII_8BIT], + [ [["\u{3042 3044 3046 3048}", 0x2000B].pack(f+"U"), Encoding::BINARY], + [["abcde\xd1", "\xFF\xFe\x81\x82"].pack(f+"u"), Encoding::BINARY], + [["a".force_encoding("ascii"), "\xFF\xFe\x81\x82"].pack(f+"u"), Encoding::BINARY], # under discussion [ruby-dev:37294] - [["\u{3042 3044 3046 3048}", 1].pack(f+"N"), Encoding::ASCII_8BIT] + [["\u{3042 3044 3046 3048}", 1].pack(f+"N"), Encoding::BINARY] ].should be_computed_by(:encoding) end end diff --git a/spec/ruby/core/array/pack/u_spec.rb b/spec/ruby/core/array/pack/u_spec.rb index d708518c16..8c3eb3a177 100644 --- a/spec/ruby/core/array/pack/u_spec.rb +++ b/spec/ruby/core/array/pack/u_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' diff --git a/spec/ruby/core/array/pack/w_spec.rb b/spec/ruby/core/array/pack/w_spec.rb index 76be1f925f..ac37a0e1c0 100644 --- a/spec/ruby/core/array/pack/w_spec.rb +++ b/spec/ruby/core/array/pack/w_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' @@ -36,7 +36,7 @@ describe "Array#pack with format 'w'" do lambda { [-1].pack("w") }.should raise_error(ArgumentError) end - it "returns an ASCII-8BIT string" do - [1].pack('w').encoding.should == Encoding::ASCII_8BIT + it "returns an BINARY string" do + [1].pack('w').encoding.should == Encoding::BINARY end end diff --git a/spec/ruby/core/array/pack/x_spec.rb b/spec/ruby/core/array/pack/x_spec.rb index 45fe34d08d..2662873d03 100644 --- a/spec/ruby/core/array/pack/x_spec.rb +++ b/spec/ruby/core/array/pack/x_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' diff --git a/spec/ruby/core/array/pack/z_spec.rb b/spec/ruby/core/array/pack/z_spec.rb index d0600f0c26..82ce7b4a1c 100644 --- a/spec/ruby/core/array/pack/z_spec.rb +++ b/spec/ruby/core/array/pack/z_spec.rb @@ -1,4 +1,4 @@ -# -*- encoding: ascii-8bit -*- +# -*- encoding: binary -*- require_relative '../../../spec_helper' require_relative '../fixtures/classes' require_relative 'shared/basic' |