diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-07 16:53:34 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-07 16:53:34 +0000 |
| commit | c5fa5530aca31e0c64955862fa396edccc439662 (patch) | |
| tree | ba43b4b9724295f6efcf8a56e442fc80ee6fd7d2 /test/ruby | |
| parent | 4fdece3c4ef432a30feb1dfd7a42fe49eeedd6a7 (diff) | |
| download | ruby-c5fa5530aca31e0c64955862fa396edccc439662.tar.gz ruby-c5fa5530aca31e0c64955862fa396edccc439662.tar.xz ruby-c5fa5530aca31e0c64955862fa396edccc439662.zip | |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_marshal.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 69c11d668..12d1bff30 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -329,4 +329,26 @@ class TestMarshal < Test::Unit::TestCase assert_equal("foo", d.instance_variable_get(:@foo)) assert_equal(false, d.instance_variable_defined?(:@x)) end + + class C6 + def initialize + @stdin = STDIN + end + attr_reader :stdin + def marshal_dump + 1 + end + def marshal_load(x) + @stdin = STDIN + end + end + def test_marshal_dump_extra_iv + o = C6.new + m = nil + assert_nothing_raised("[ruby-dev:21475] [ruby-dev:39845]") { + m = Marshal.dump(o) + } + o2 = Marshal.load(m) + assert_equal(STDIN, o.stdin) + end end |
