mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
-- * thread.c (ruby_suppress_tracing): restore the state and invoke the func with normal state. a patch from Satoshi Shiba <shiba AT rvm.jp> at [ruby-dev:42162]. [ruby-core:31783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b98fa0b2a5
commit
7f5d559cfc
4 changed files with 23 additions and 1 deletions
|
@ -46,4 +46,16 @@ class TestTrace < Test::Unit::TestCase
|
|||
ensure
|
||||
untrace_var :$x
|
||||
end
|
||||
|
||||
def test_trace_break
|
||||
bug2722 = '[ruby-core:31783]'
|
||||
a = Object.new.extend(Enumerable)
|
||||
def a.each
|
||||
yield
|
||||
end
|
||||
assert(Thread.start {
|
||||
Thread.current.add_trace_func(proc{})
|
||||
a.any? {true}
|
||||
}.value, bug2722)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue