@@ -423,14 +423,9 @@ protected RubyString timeStrftime(RubyTime time, Object format,
423
423
@ Cached RopeNodes .EqualNode equalNode ,
424
424
@ Cached ("formatCanBeFast(pattern)" ) boolean canUseFast ,
425
425
@ Cached ConditionProfile yearIsFastProfile ,
426
- @ Cached RopeNodes .ConcatNode concatNode ,
427
- @ Cached RopeNodes .SubstringNode substringNode ) {
426
+ @ Cached RopeNodes .ConcatNode concatNode ) {
428
427
if (canUseFast && yearIsFastProfile .profile (yearIsFast (time ))) {
429
- return makeStringNode .fromRope (RubyDateFormatter .formatToRopeFast (
430
- pattern ,
431
- time .dateTime ,
432
- concatNode ,
433
- substringNode ));
428
+ return makeStringNode .fromRope (RubyDateFormatter .formatToRopeFast (pattern , time .dateTime , concatNode ));
434
429
} else {
435
430
return makeStringNode .fromBuilderUnsafe (formatTime (time , pattern ), CodeRange .CR_UNKNOWN );
436
431
}
@@ -440,15 +435,10 @@ protected RubyString timeStrftime(RubyTime time, Object format,
440
435
@ Specialization (guards = "libFormat.isRubyString(format)" )
441
436
protected RubyString timeStrftime (RubyTime time , Object format ,
442
437
@ CachedLibrary (limit = "2" ) RubyStringLibrary libFormat ,
443
- @ Cached RopeNodes .ConcatNode concatNode ,
444
- @ Cached RopeNodes .SubstringNode substringNode ) {
438
+ @ Cached RopeNodes .ConcatNode concatNode ) {
445
439
final Token [] pattern = compilePattern (libFormat .getRope (format ));
446
440
if (formatCanBeFast (pattern ) && yearIsFast (time )) {
447
- return makeStringNode .fromRope (RubyDateFormatter .formatToRopeFast (
448
- pattern ,
449
- time .dateTime ,
450
- concatNode ,
451
- substringNode ));
441
+ return makeStringNode .fromRope (RubyDateFormatter .formatToRopeFast (pattern , time .dateTime , concatNode ));
452
442
} else {
453
443
return makeStringNode .fromBuilderUnsafe (formatTime (time , pattern ), CodeRange .CR_UNKNOWN );
454
444
}
0 commit comments