summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/marshal/test_internal_ivar.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/-ext-/marshal/test_internal_ivar.rb b/test/-ext-/marshal/test_internal_ivar.rb
index 51529667b5..a32138f6e8 100644
--- a/test/-ext-/marshal/test_internal_ivar.rb
+++ b/test/-ext-/marshal/test_internal_ivar.rb
@@ -7,14 +7,18 @@ module Bug end
module Bug::Marshal
class TestInternalIVar < Test::Unit::TestCase
def test_marshal
- v = InternalIVar.new("hello", "world")
+ v = InternalIVar.new("hello", "world", "bye")
assert_equal("hello", v.normal)
assert_equal("world", v.internal)
- dump = ::Marshal.dump(v)
+ assert_equal("bye", v.encoding_short)
+ dump = assert_warn(/instance variable `E' on class \S+ is not dumped/) {
+ ::Marshal.dump(v)
+ }
v = assert_nothing_raised {break ::Marshal.load(dump)}
assert_instance_of(InternalIVar, v)
assert_equal("hello", v.normal)
assert_nil(v.internal)
+ assert_nil(v.encoding_short)
end
end
end