Issue #18060 has been reported by alanwu (Alan Wu).

----------------------------------------
Bug #18060: Infinite loop when b_return TracePoint raises
https://bugs.ruby-lang.org/issues/18060

* Author: alanwu (Alan Wu)
* Status: Open
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
The following program loops indefinitely:

```ruby
# Warning: prints in an infinite loop
class Foo
  define_singleton_method(:foo) { return }
end

TracePoint.trace(:b_return) do |tp|
  p tp
  raise
end

Foo.foo
```

It doesn't seem intentional that this loops.

Fix: https://github.com/ruby/ruby/pull/4638



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>