Skip to content

Commit 1e7bcf8

Browse files
committed
Restore local variable
1 parent 138cf5f commit 1e7bcf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/truffleruby/core/time/TimeNodes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,9 @@ protected boolean formatToRopeBuilderCanBeFast(Token[] pattern) {
438438
@Specialization(guards = "libFormat.isRubyString(format)")
439439
protected RubyString timeStrftime(VirtualFrame frame, RubyTime time, Object format,
440440
@CachedLibrary(limit = "2") RubyStringLibrary libFormat) {
441+
final Token[] pattern = compilePattern(libFormat.getRope(format));
441442
return makeStringNode.fromBuilderUnsafe(
442-
formatTime(time, compilePattern(libFormat.getRope(format))),
443+
formatTime(time, pattern),
443444
CodeRange.CR_UNKNOWN);
444445
}
445446

0 commit comments

Comments
 (0)