From 13b6b5f356547a51751d81391d33f5c81ebaca7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= Date: Tue, 23 Jun 2020 15:17:21 +0200 Subject: [PATCH] fixnum and bignum deprecated in Ruby>=2.4 --- test/packing_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/packing_test.rb b/test/packing_test.rb index 007f8e4..0ac7070 100644 --- a/test/packing_test.rb +++ b/test/packing_test.rb @@ -55,7 +55,6 @@ def test_bignum assert_equal 1.pack(:long), ((1 << 69) + 1).pack(:long) assert_equal "*" + ("\000" * 15), (42 << (8*15)).pack(:bytes => 16) assert_equal 42 << (8*15), (42 << (8*15)).pack(:bytes => 16).unpack(Integer, :bytes => 16) - assert_equal 42 << (8*15), (42 << (8*15)).pack(:bytes => 16).unpack(Bignum, :bytes => 16) end def test_float @@ -69,7 +68,7 @@ def test_float def test_io io = StringIO.new("\000\000\000\006abcdE!") - n, s, c = io >> [Fixnum, {:signed=>false}] >> [String, {:bytes => 4}] >> :char + n, s, c = io >> [Integer, {:signed=>false}] >> [String, {:bytes => 4}] >> :char assert_equal 6, n assert_equal "abcd", s assert_equal 69, c @@ -120,7 +119,7 @@ def test_io_read_to_outbuf end should "be follow accessible everywhere" do assert_equal "StringHello", "Hello".pack(:generic_class_writer) - assert_equal "Fixnum\000\000\000\006", 6.pack(:generic_class_writer) + assert_match /Integer\x00\x00\x00\x06$/, 6.pack(:generic_class_writer) end end context "for a specific class" do