diff options
Diffstat (limited to 'spec/ruby/core/marshal/dump_spec.rb')
-rw-r--r-- | spec/ruby/core/marshal/dump_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/marshal/dump_spec.rb b/spec/ruby/core/marshal/dump_spec.rb index 8d6ba245af..0e50df7227 100644 --- a/spec/ruby/core/marshal/dump_spec.rb +++ b/spec/ruby/core/marshal/dump_spec.rb @@ -15,8 +15,8 @@ describe "Marshal.dump" do Marshal.dump(false).should == "\004\bF" end - describe "with a Fixnum" do - it "dumps a Fixnum" do + describe "with an Integer" do + it "dumps an Integer" do [ [Marshal, 0, "\004\bi\000"], [Marshal, 5, "\004\bi\n"], [Marshal, 8, "\004\bi\r"], @@ -38,11 +38,11 @@ describe "Marshal.dump" do end platform_is wordsize: 64 do - it "dumps a positive Fixnum > 31 bits as a Bignum" do + it "dumps a positive Integer > 31 bits as an Integer" do Marshal.dump(2**31 + 1).should == "\x04\bl+\a\x01\x00\x00\x80" end - it "dumps a negative Fixnum > 31 bits as a Bignum" do + it "dumps a negative Integer > 31 bits as an Integer" do Marshal.dump(-2**31 - 1).should == "\x04\bl-\a\x01\x00\x00\x80" end end @@ -157,14 +157,14 @@ describe "Marshal.dump" do end end - describe "with a Bignum" do - it "dumps a Bignum" do + describe "with an Integer" do + it "dumps an Integer" do [ [Marshal, -4611686018427387903, "\004\bl-\t\377\377\377\377\377\377\377?"], [Marshal, -2361183241434822606847, "\004\bl-\n\377\377\377\377\377\377\377\377\177\000"], ].should be_computed_by(:dump) end - it "dumps a Bignum" do + it "dumps an Integer" do [ [Marshal, 2**64, "\004\bl+\n\000\000\000\000\000\000\000\000\001\000"], [Marshal, 2**90, "\004\bl+\v#{"\000" * 11}\004"], [Marshal, -2**63, "\004\bl-\t\000\000\000\000\000\000\000\200"], |