Skip to content

Commit

Permalink
Restore some 19 methods still in use by json
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Mar 26, 2024
1 parent ae044e9 commit c60310f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
Expand Up @@ -6430,6 +6430,12 @@ public RubySymbol intern() {
return symbol;
}

// Must remain in place until json has migrated to the new method for some time (https://github.com/flori/json/pull/576)
@Deprecated
public RubySymbol intern19() {
return intern();
}

@JRubyMethod
public IRubyObject ord(ThreadContext context) {
final Ruby runtime = context.runtime;
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/java/org/jruby/util/ConvertBytes.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ public static RubyInteger byteListToInum(Ruby runtime, ByteList str, int off, in
return (RubyInteger) new ConvertBytes(runtime, str, off, end, base, badcheck).byteListToInum(true);
}

// Must remain in place until json has migrated to the new method for some time (https://github.com/flori/json/pull/576)
@Deprecated
public static RubyInteger byteListToInum19(Ruby runtime, ByteList str, int base, boolean badcheck) {
return byteListToInum(runtime, str, base, badcheck);
}

private final static byte[] conv_digit = new byte[128];
private final static boolean[] digit = new boolean[128];
private final static boolean[] space = new boolean[128];
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/util/ConvertDouble.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
package org.jruby.util;

public class ConvertDouble {
// Must remain in place until json has migrated to the new method for some time (https://github.com/flori/json/pull/576)
@Deprecated
public static double byteListToDouble19(ByteList bytes, boolean strict) {
return byteListToDouble(bytes, strict);
Expand Down

0 comments on commit c60310f

Please sign in to comment.