From 09205cf2c3334b078677c430d83b42352d929a26 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 9 Feb 2010 19:06:39 +0000 Subject: * vm.c (vm_exec): reset thread state before starting vm loop. [ruby-core:28129] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_flow.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb index 46ca1a0c6a..84ef216421 100644 --- a/bootstraptest/test_flow.rb +++ b/bootstraptest/test_flow.rb @@ -502,3 +502,24 @@ assert_equal %Q{ENSURE\n}, %q{ test }, '[ruby-dev:37967]' +[['[ruby-core:28129]', %q{ + class Bug2728 + include Enumerable + define_method(:dynamic_method) do + "dynamically defined method" + end + def each + begin + yield :foo + ensure + dynamic_method + end + end + end + e = Bug2728.new +}]].each do |bug, src| + assert_equal "foo", src + %q{e.detect {true}}, bug + assert_equal "true", src + %q{e.any? {true}}, bug + assert_equal "false", src + %q{e.all? {false}}, bug + assert_equal "true", src + %q{e.include?(:foo)}, bug +end -- cgit v1.2.3