summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 02:51:38 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 02:51:38 +0000
commitf0680bdee869d37c0b654d0226ae665e6adc934e (patch)
treed9eecce90301c7aa9713e27063f8c373f42a011f /test
parent0399a3d47b4e784918f95a36c2987633c29f8690 (diff)
merge revision(s) 52856,52906: [Backport #11760]
* encoding.c (enc_m_loader): defer finding encoding object not to be infected by marshal source. [ruby-core:71793] [Bug #11760] * marshal.c (r_object0): enable compatible loader on USERDEF class. the loader function is called with the class itself, instead of an allocated object, and the loaded data. * marshal.c (compat_allocator_table): intialize compat_allocator_tbl on demand. * object.c (rb_undefined_alloc): extract from rb_obj_alloc. * marshal.c (compat_allocator_table): initialize git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@52933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_encoding.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index 85f1a2df17..bae8e763b3 100644
--- a/test/ruby/test_encoding.rb
+++ b/test/ruby/test_encoding.rb
@@ -34,6 +34,9 @@ class TestEncoding < Test::Unit::TestCase
assert_raise(TypeError) { e.dup }
assert_raise(TypeError) { e.clone }
assert_equal(e.object_id, Marshal.load(Marshal.dump(e)).object_id)
+ assert_not_predicate(e, :tainted?)
+ Marshal.load(Marshal.dump(e).taint)
+ assert_not_predicate(e, :tainted?, '[ruby-core:71793] [Bug #11760]')
end
end