Skip to content

Commit 8ea672c

Browse files
author
Nicolas Laurent
committed
pull up common getByteSlow definition
1 parent f34debd commit 8ea672c

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

src/main/java/org/truffleruby/core/rope/ConcatRope.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ Rope withBinaryEncoding() {
7777
balanced);
7878
}
7979

80-
@Override
81-
public byte getByteSlow(int index) {
82-
return RopeOperations.getByteSlow(this, index);
83-
}
84-
8580
public ManagedRope getLeft() {
8681
return left;
8782
}

src/main/java/org/truffleruby/core/rope/ManagedRope.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public final int characterLength() {
3939
return characterLength;
4040
}
4141

42+
@Override
43+
protected byte getByteSlow(int index) {
44+
return RopeOperations.getByteSlow(this, index);
45+
}
46+
4247
@Override
4348
public final byte[] getBytes() {
4449
if (bytes == null) {

src/main/java/org/truffleruby/core/rope/RepeatingRope.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ protected byte[] getBytesSlow() {
6868
return super.getBytesSlow();
6969
}
7070

71-
@Override
72-
protected byte getByteSlow(int index) {
73-
return RopeOperations.getByteSlow(this, index);
74-
}
75-
7671
public ManagedRope getChild() {
7772
return child;
7873
}

src/main/java/org/truffleruby/core/rope/SubstringRope.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ protected byte[] getBytesSlow() {
8080
return super.getBytesSlow();
8181
}
8282

83-
@Override
84-
public byte getByteSlow(int index) {
85-
return RopeOperations.getByteSlow(this, index);
86-
}
87-
8883
public ManagedRope getChild() {
8984
return child;
9085
}

0 commit comments

Comments
 (0)