Skip to content

Commit 9e8381b

Browse files
committed
Fix too long specialization names that cause filenames to exceed the limit for eCryptfs
1 parent 33c822f commit 9e8381b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/org/truffleruby/core/string/StringNodes.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4403,7 +4403,7 @@ protected int notValidUtf8(Object string, int byteIndex,
44034403
@NodeChild(value = "string", type = RubyNode.class)
44044404
@NodeChild(value = "pattern", type = RubyNode.class)
44054405
@NodeChild(value = "offset", type = RubyNode.class)
4406-
public abstract static class StringCharacterIndexPrimitiveNode extends PrimitiveNode {
4406+
public abstract static class StringCharacterIndexNode extends PrimitiveNode {
44074407

44084408
@Child SingleByteOptimizableNode singleByteOptimizableNode = SingleByteOptimizableNode.create();
44094409

@@ -4422,7 +4422,7 @@ protected RubyNode coercePatternToRope(RubyNode pattern) {
44224422
"offset >= 0",
44234423
"singleByteOptimizableNode.execute(stringRope)",
44244424
"!patternFits(stringRope, patternRope, offset)" })
4425-
protected Object stringCharacterIndexPatternTooLarge(Rope stringRope, Rope patternRope, int offset) {
4425+
protected Object patternTooLarge(Rope stringRope, Rope patternRope, int offset) {
44264426
return nil;
44274427
}
44284428

@@ -4431,7 +4431,7 @@ protected Object stringCharacterIndexPatternTooLarge(Rope stringRope, Rope patte
44314431
"offset >= 0",
44324432
"singleByteOptimizableNode.execute(stringRope)",
44334433
"patternFits(stringRope, patternRope, offset)" })
4434-
protected Object stringCharacterIndexSingleByteOptimizable(Rope stringRope, Rope patternRope, int offset,
4434+
protected Object singleByteOptimizable(Rope stringRope, Rope patternRope, int offset,
44354435
@Cached RopeNodes.BytesNode stringBytesNode,
44364436
@Cached RopeNodes.BytesNode patternBytesNode,
44374437
@Cached LoopConditionProfile loopProfile,
@@ -4463,7 +4463,7 @@ protected Object stringCharacterIndexSingleByteOptimizable(Rope stringRope, Rope
44634463
guards = {
44644464
"offset >= 0",
44654465
"!singleByteOptimizableNode.execute(stringRope)" })
4466-
protected Object stringCharacterIndex(Rope stringRope, Rope patternRope, int offset,
4466+
protected Object multiByte(Rope stringRope, Rope patternRope, int offset,
44674467
@Cached RopeNodes.CalculateCharacterLengthNode calculateCharacterLengthNode,
44684468
@Cached RopeNodes.BytesNode stringBytesNode,
44694469
@Cached RopeNodes.BytesNode patternBytesNode) {
@@ -4514,7 +4514,7 @@ protected boolean patternFits(Rope stringRope, Rope patternRope, int offset) {
45144514
@NodeChild(value = "string", type = RubyNode.class)
45154515
@NodeChild(value = "pattern", type = RubyNode.class)
45164516
@NodeChild(value = "offset", type = RubyNode.class)
4517-
public abstract static class StringByteIndexPrimitiveNode extends PrimitiveNode {
4517+
public abstract static class StringByteIndexNode extends PrimitiveNode {
45184518

45194519
@Child SingleByteOptimizableNode singleByteOptimizableNode = SingleByteOptimizableNode.create();
45204520

@@ -4529,7 +4529,7 @@ protected RubyNode coercePatternToRope(RubyNode pattern) {
45294529
}
45304530

45314531
@Specialization(guards = { "offset >= 0", "!patternFits(stringRope, patternRope, offset)" })
4532-
protected Object stringByteIndexPatternTooLarge(Rope stringRope, Rope patternRope, int offset) {
4532+
protected Object patternTooLarge(Rope stringRope, Rope patternRope, int offset) {
45334533
return nil;
45344534
}
45354535

@@ -4538,7 +4538,7 @@ protected Object stringByteIndexPatternTooLarge(Rope stringRope, Rope patternRop
45384538
"offset >= 0",
45394539
"singleByteOptimizableNode.execute(stringRope)",
45404540
"patternFits(stringRope, patternRope, offset)" })
4541-
protected Object stringByteIndexSingleByteOptimizable(Rope stringRope, Rope patternRope, int offset,
4541+
protected Object singleByteOptimizable(Rope stringRope, Rope patternRope, int offset,
45424542
@Cached RopeNodes.BytesNode stringBytesNode,
45434543
@Cached RopeNodes.BytesNode patternBytesNode,
45444544
@Cached LoopConditionProfile loopProfile,
@@ -4571,7 +4571,7 @@ protected Object stringByteIndexSingleByteOptimizable(Rope stringRope, Rope patt
45714571
"offset >= 0",
45724572
"!singleByteOptimizableNode.execute(stringRope)",
45734573
"patternFits(stringRope, patternRope, offset)" })
4574-
protected Object stringByteIndex(Rope stringRope, Rope patternRope, int offset,
4574+
protected Object multiByte(Rope stringRope, Rope patternRope, int offset,
45754575
@Cached RopeNodes.CalculateCharacterLengthNode calculateCharacterLengthNode,
45764576
@Cached RopeNodes.BytesNode stringBytesNode,
45774577
@Cached RopeNodes.BytesNode patternBytesNode) {

tool/jt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ def command_format(changed_java_files = nil)
23142314
format_specializations_check
23152315
end
23162316

2317-
private def check_filename_length
2317+
def check_filename_length
23182318
# For eCryptfs, see https://bugs.launchpad.net/ecryptfs/+bug/344878
23192319
max_length = 143
23202320

0 commit comments

Comments
 (0)