1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* range.c (range_dumper): make uninitialized range dumpable.

(range_loader): make uninitialized range loadable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-09-10 06:50:22 +00:00
parent 4261abb230
commit 068d11ef96
3 changed files with 13 additions and 3 deletions

View file

@ -64,4 +64,11 @@ class TestRange < Test::Unit::TestCase
r = eval("1..2")
assert_raise(NameError) { r.instance_eval { initialize 3, 4 } }
end
def test_uninitialized_range
r = Range.allocate
s = Marshal.dump(r)
r = Marshal.load(s)
assert_nothing_raised { r.instance_eval { initialize 5, 6} }
end
end