1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2010-02-09 19:06:39 +00:00
parent 520053232e
commit 09205cf2c3
3 changed files with 28 additions and 5 deletions

View file

@ -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