diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2022-12-16 04:04:41 +0900 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2022-12-16 12:15:50 +0100 |
commit | ee7a338d2b21a84d194015c3680bd2a95c0dd23f (patch) | |
tree | f99be0249bbc7f06a9a29fadecb5062e7121dcd2 /test/ruby/test_pack.rb | |
parent | b9ea83fc1c95dba0f5548e6bd1b2fa40c6e65e2d (diff) |
Unconditionally warn "unknown pack/unpack directive"
[Bug #19150]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6948
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r-- | test/ruby/test_pack.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index 2706dbfaee..0ee36857ba 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -777,21 +777,13 @@ EXPECTED end def test_pack_garbage - assert_warn("") do - assert_equal "\000", [0].pack("*U") - end - - assert_warning(%r%unknown pack directive '\*' in '\*U'$%) do + assert_warn(%r%unknown pack directive '\*' in '\*U'$%) do assert_equal "\000", [0].pack("*U") end end def test_unpack_garbage - assert_warn("") do - assert_equal [0], "\000".unpack("*U") - end - - assert_warning(%r%unknown unpack directive '\*' in '\*U'$%) do + assert_warn(%r%unknown unpack directive '\*' in '\*U'$%) do assert_equal [0], "\000".unpack("*U") end end |