Skip to content

Commit

Permalink
Restore these names for transition purposes
Browse files Browse the repository at this point in the history
Additional two names used by StringIO. See ruby/stringio#84 and
ruby/stringio#88.
  • Loading branch information
headius committed Mar 13, 2024
1 parent 46cef2e commit 989ade7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,11 @@ public final void modify() {
value.invalidate();
}

@Deprecated
public final void modify19() {
return modifyAndClearCodeRange();
}

public final void modifyAndClearCodeRange() {
modify();
clearCodeRange();
Expand Down Expand Up @@ -3535,6 +3540,11 @@ private IRubyObject byteARef(Ruby runtime, IRubyObject idx) {
return obj;
}

@Deprecated
public final IRubyObject substr19(Ruby runtime, int beg, int len) {
return substrEnc(runtime, beg, len);
}

public final IRubyObject substrEnc(Ruby runtime, int beg, int len) {
if (len < 0) return runtime.getNil();
int length = value.getRealSize();
Expand Down

0 comments on commit 989ade7

Please sign in to comment.