Skip to content

Commit e6a0c4e

Browse files
committed
Push a frame for thread toplevel
A new Thread should have a toplevel frame, even if the code it runs has been frame-optimized or is not Ruby code. This prevents any attempts to get a current binding from failing to access the frame stack. Fixes jruby#9308.
1 parent 5cbf5a6 commit e6a0c4e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

core/src/main/java/org/jruby/internal/runtime/RubyRunnable.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public void run() {
100100
// uber-ThreadKill catcher, since it should always just mean "be dead"
101101
try {
102102
// Push a frame for the toplevel of the thread
103+
context.pushFrame();
103104

104105
// Call the thread's code
105106
Block threadBlock = proc.getBlock();

0 commit comments

Comments
 (0)