Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb77f18

Browse files
committed
Fix jruby#2417. Rescue clause yielding TypeError hits %undefined
1 parent 72353c0 commit eb77f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/jruby/ir/IRBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,7 @@ private void buildRescueBodyInternal(IRScope s, RescueBodyNode rescueBodyNode, V
31243124
// of StandardError. I am ignoring this for now and treating this as undefined behavior.
31253125
//
31263126
// Solution: Create a 'StandardError' operand type to eliminate this.
3127-
Variable v = addResultInstr(s, new InheritanceSearchConstInstr(s.createTemporaryVariable(), s.getCurrentModuleVariable(), "StandardError", false));
3127+
Variable v = addResultInstr(s, new InheritanceSearchConstInstr(s.createTemporaryVariable(), new ObjectClass(), "StandardError", false));
31283128
outputExceptionCheck(s, v, exc, caughtLabel);
31293129
}
31303130

0 commit comments

Comments
 (0)