summaryrefslogtreecommitdiff
path: root/bootstraptest/test_flow.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-09 19:06:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-09 19:06:39 +0000
commit09205cf2c3334b078677c430d83b42352d929a26 (patch)
treeabf1824752954b0babdb703061b88c2d4769524e /bootstraptest/test_flow.rb
parent520053232e76b03952b7e80be2c5a906132de195 (diff)
* 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
Diffstat (limited to 'bootstraptest/test_flow.rb')
-rw-r--r--bootstraptest/test_flow.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb
index 46ca1a0..84ef216 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