diff options
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r-- | test/ruby/test_marshal.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index e4e4cc3c6a..ac804eb24c 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -252,6 +252,19 @@ module MarshalTestLib marshal_equal(o) {|obj| class << obj; ancestors end} end + def test_extend_string + o = String.new + o.extend Mod1 + marshal_equal(o) { |obj| obj.kind_of? Mod1 } + o = String.new + o.extend Module.new + assert_raises(TypeError) { marshaltest(o) } + o = String.new + o.extend Mod1 + o.extend Mod2 + marshal_equal(o) {|obj| class << obj; ancestors end} + end + def test_anonymous c = Class.new assert_raises(TypeError) { marshaltest(c) } |