aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-19 02:19:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-19 02:19:45 +0000
commitc82488b81d87f25663c9eaf4fae493d6bd2432ce (patch)
treed3e0b148629d6a8c7e14eaeed0499ba6ecb2bdca /test
parent0aaeb888d9d3db0016e1b321446dd2b6a599e812 (diff)
downloadruby-c82488b81d87f25663c9eaf4fae493d6bd2432ce.tar.gz
variable.c: consider length
* variable.c (rb_path_to_class): consider the string length instead of a terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index b723fcae3c..8bfca5561f 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -719,10 +719,12 @@ class TestMarshal < Test::Unit::TestCase
end
def test_marshal_load_extended_class_crash
- crash = "\x04\be:\x0F\x00omparableo:\vObject\x00"
-
- opt = %w[--disable=gems]
- assert_ruby_status(opt, "Marshal.load(#{crash.dump})")
+ assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}")
+ begin;
+ assert_raise_with_message(ArgumentError, /undefined/) do
+ Marshal.load("\x04\be:\x0F\x00omparableo:\vObject\x00")
+ end
+ end;
end
def test_marshal_load_r_prepare_reference_crash