From 8ce9863dd9c6a3234e46d2645d1c2259d9ac62d1 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 12 Jan 2016 15:17:19 +0000 Subject: iseq.c: mark parents of wrapped iseq * iseq.c (iseqw_mark): as wrapped iseq is isolated from the call stack, it needs to take care of its parent and ancestors, so that they do not become orphans. [ruby-core:72620] [Bug #11928] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_exception.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/test_exception.rb') diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 1148277a1b..91732dd062 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -701,6 +701,12 @@ end.join assert_equal(%i[a b c d e f g], e.local_variables.sort) end + def test_name_error_info_parent_iseq_mark + assert_separately(['-', File.join(__dir__, 'bug-11928.rb')], <<-'end;') + -> {require ARGV[0]}.call + end; + end + def test_output_string_encoding # "\x82\xa0" in cp932 is "\u3042" (Japanese hiragana 'a') # change $stderr to force calling rb_io_write() instead of fwrite() -- cgit v1.2.3