Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixnum and bignum deprecated in Ruby>=2.4 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/packing_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down