Skip to content

Commit 38b09dc

Browse files
committed
Handle strftime("") correctly in the fast path
* Tested in test/mri/tests/ruby/test_time.rb
1 parent 2b11749 commit 38b09dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ public static Rope formatToRopeFast(Token[] compiledPattern, ZonedDateTime dt,
692692
}
693693
}
694694

695+
if (rope == null) {
696+
rope = RopeConstants.EMPTY_UTF8_ROPE;
697+
}
698+
695699
return rope;
696700
}
697701

0 commit comments

Comments
 (0)