diff options
Diffstat (limited to 'spec/ruby/core/string/unpack/shared/unicode.rb')
| -rw-r--r-- | spec/ruby/core/string/unpack/shared/unicode.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/ruby/core/string/unpack/shared/unicode.rb b/spec/ruby/core/string/unpack/shared/unicode.rb index a2b4e142b2..9b4e0c09de 100644 --- a/spec/ruby/core/string/unpack/shared/unicode.rb +++ b/spec/ruby/core/string/unpack/shared/unicode.rb @@ -50,8 +50,10 @@ describe :string_unpack_unicode, shared: true do "\xc2\x80".unpack("UUUU").should == [0x80] end - it "ignores NULL bytes between directives" do - "\x01\x02".unpack("U\x00U").should == [1, 2] + it "raise ArgumentError for NULL bytes between directives" do + -> { + "\x01\x02".unpack("U\x00U") + }.should.raise(ArgumentError, /unknown unpack directive/) end it "ignores spaces between directives" do |
