diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-30 08:46:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-30 08:46:41 +0000 |
commit | 04ca48fc38f9d006e2711287f9576a606d0d269a (patch) | |
tree | d2a92d8e9e63901f8c40620b287c3cb6e043d20d /test/-ext-/exception | |
parent | 520f0fec9519647e8ae1dfc15756b537fe580d6e (diff) |
eval.c: determine exit status and signal before finalization
* eval.c (ruby_cleanup): determine exit status and signal to terminate
before finalization, to get rid of access destroyed T_DATA execption
object. [ruby-core:58643] [Bug #9167]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/exception')
-rw-r--r-- | test/-ext-/exception/test_data_error.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/-ext-/exception/test_data_error.rb b/test/-ext-/exception/test_data_error.rb new file mode 100644 index 0000000000..140de5bd5a --- /dev/null +++ b/test/-ext-/exception/test_data_error.rb @@ -0,0 +1,14 @@ +require 'test/unit' +require_relative '../../ruby/envutil' + +module Bug + class TestException < Test::Unit::TestCase + def test_cleanup_data_error + bug9167 = '[ruby-core:58643] [Bug #9167]' + assert_normal_exit(<<-'end;', bug9167) # do + require '-test-/exception' + raise Bug::Exception::DataError, "Error" + end; + end + end +end |