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:
parent
4261abb230
commit
068d11ef96
3 changed files with 13 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue