summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 07:53:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 07:53:19 +0000
commitabbe26c60f24b38dd764ef0d756cb5274c941acd (patch)
treeecba160b8e4c7edbe1f2ec83d2ddb3d456f5870a /test/ruby
parent692ce765054531e65f99ec67f42144746ec8a6e9 (diff)
* gc.c (rb_mark_set): new function to mark keys.
* marshal.c (struct dump_arg, struct load_arg): added wrappers to mark data entries. backport from trunk r13527,r13528,r13961,r16533. [ruby-dev:36082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/marshaltestlib.rb6
-rw-r--r--test/ruby/test_marshal.rb6
2 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/marshaltestlib.rb b/test/ruby/marshaltestlib.rb
index 891f43b1f7..ae60cd8479 100644
--- a/test/ruby/marshaltestlib.rb
+++ b/test/ruby/marshaltestlib.rb
@@ -193,6 +193,12 @@ module MarshalTestLib
1.instance_eval { remove_instance_variable("@iv") }
end
+ def test_fixnum_64bit
+ obj = [1220278665, 1220278662, 1220278661, 1220278661, 1220278656]
+
+ marshal_equal(obj)
+ end
+
def test_float
marshal_equal(-1.0)
marshal_equal(0.0)
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 11f3583076..68f50ff728 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -12,11 +12,17 @@ class TestMarshal < Test::Unit::TestCase
include MarshalTestLib
def encode(o)
+ stress, GC.stress = GC.stress, true
Marshal.dump(o)
+ ensure
+ GC.stress = stress
end
def decode(s)
+ stress, GC.stress = GC.stress, true
Marshal.load(s)
+ ensure
+ GC.stress = stress
end
def fact(n)