Skip to content

Commit

Permalink
Remove remaining "19" methods
Browse files Browse the repository at this point in the history
These methods were not deprecated before JRuby 10, so they were
left in place for one additional "major" release. This deletes
them.

They are very low risk of causing compile or execution problems,
but this safer approach gives any remaining users a full version
cycle to switch to the long-available normal versions.

See jruby#8143 for the original pass that removed already-
deprecated methods.
  • Loading branch information
headius committed Mar 12, 2024
1 parent acf945c commit 8e69949
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 237 deletions.
10 changes: 0 additions & 10 deletions core/src/main/java/org/jruby/RubyArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -2078,11 +2078,6 @@ private void recursiveJoin(final ThreadContext context, final IRubyObject outVal
context.safeRecurse(JOIN_RECURSIVE, new JoinRecursive.State(ary, outValue, sep, result, first), outValue, "join", true);
}

@Deprecated
public IRubyObject join19(final ThreadContext context, IRubyObject sep) {
return join(context, sep);
}

/** rb_ary_join
*
*/
Expand Down Expand Up @@ -2124,11 +2119,6 @@ public IRubyObject join(final ThreadContext context, IRubyObject sep) {
return result;
}

@Deprecated
public IRubyObject join19(ThreadContext context) {
return join(context);
}

@JRubyMethod(name = "join")
public IRubyObject join(ThreadContext context) {
return join(context, getDefaultSeparator(context.runtime));
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyDir.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,6 @@ public static RubyArray children(ThreadContext context, IRubyObject recv, IRubyO
return dir.children(context);
}

@Deprecated
public static IRubyObject rmdir19(IRubyObject recv, IRubyObject path) {
return rmdir(recv.getRuntime().getCurrentContext(), recv, path);
}

/**
* Deletes the directory specified by <code>path</code>. The directory must be empty.
*/
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -1268,11 +1268,6 @@ public static IRubyObject readlink(ThreadContext context, IRubyObject recv, IRub
}
}

@Deprecated
public static IRubyObject truncate19(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2) {
return truncate(context, recv, arg1, arg2);
}

// Can we produce IOError which bypasses a close?
@JRubyMethod(name = "truncate", meta = true)
public static IRubyObject truncate(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2) {
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyFileStat.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ private void setup(String filename, boolean lstat) {
}
}

@Deprecated
public IRubyObject initialize19(IRubyObject fname, Block unusedBlock) {
return initialize(fname, unusedBlock);
}

@JRubyMethod(name = "initialize", visibility = Visibility.PRIVATE)
public IRubyObject initialize(IRubyObject fname, Block unusedBlock) {
Ruby runtime = getRuntime();
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyMatchData.java
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,6 @@ public IRubyObject end(ThreadContext context, IRubyObject index) {
return RubyFixnum.newFixnum(runtime, e);
}

@Deprecated
public IRubyObject offset19(ThreadContext context, IRubyObject index) {
return offset(context, index);
}

/** match_offset
*
*/
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,6 @@ public static RubyFloat cbrt(ThreadContext context, IRubyObject recv, IRubyObjec
return RubyFloat.newFloat(context.runtime, result);
}

@Deprecated
public static RubyFloat hypot19(ThreadContext context, IRubyObject recv, IRubyObject x, IRubyObject y) {
return hypot(context, recv, x, y);
}

@JRubyMethod(name = "hypot", module = true, visibility = Visibility.PRIVATE)
public static RubyFloat hypot(ThreadContext context, IRubyObject recv, IRubyObject x, IRubyObject y) {
double valuea = RubyNumeric.num2dbl(context, x);
Expand Down
25 changes: 0 additions & 25 deletions core/src/main/java/org/jruby/RubyModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3200,23 +3200,13 @@ protected void addMethodSymbols(Ruby runtime, Set<String> seen, RubyArray ary, b
});
}

@Deprecated
public RubyArray instance_methods19(IRubyObject[] args) {
return instance_methods(args);
}

@JRubyMethod(name = "instance_methods", optional = 1, checkArity = false)
public RubyArray instance_methods(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);

return instanceMethods(args, PRIVATE, false, true);
}

@Deprecated
public RubyArray public_instance_methods19(IRubyObject[] args) {
return public_instance_methods(args);
}

@JRubyMethod(name = "public_instance_methods", optional = 1, checkArity = false)
public RubyArray public_instance_methods(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);
Expand Down Expand Up @@ -4014,11 +4004,6 @@ public IRubyObject class_variable_defined_p(ThreadContext context, IRubyObject v
return context.fals;
}

@Deprecated
public IRubyObject class_variable_get19(IRubyObject name) {
return class_variable_get(name);
}

/** rb_mod_cvar_get
*
*/
Expand All @@ -4035,11 +4020,6 @@ public IRubyObject class_variable_set(IRubyObject name, IRubyObject value) {
return setClassVar(validateClassVariable(getRuntime(), name), value);
}

@Deprecated
public IRubyObject class_variable_set19(IRubyObject name, IRubyObject value) {
return class_variable_set(name, value);
}

/** rb_mod_remove_cvar
*
*/
Expand All @@ -4048,11 +4028,6 @@ public IRubyObject remove_class_variable(ThreadContext context, IRubyObject name
return removeClassVariable(validateClassVariable(context.runtime, name));
}

@Deprecated
public IRubyObject remove_class_variable19(ThreadContext context, IRubyObject name) {
return remove_class_variable(context, name);
}

@JRubyMethod(name = "class_variables")
public RubyArray class_variables(ThreadContext context) {
Ruby runtime = context.runtime;
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/RubyProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -1819,11 +1819,6 @@ public static IRubyObject _fork(ThreadContext context, IRubyObject recv, Block b
throw context.runtime.newNotImplementedError("fork is not available on this platform");
}

@Deprecated
public static IRubyObject fork19(ThreadContext context, IRubyObject recv, Block block) {
return fork(context, recv, block);
}

@JRubyMethod(name = "fork", module = true, visibility = PRIVATE, notImplemented = true)
public static IRubyObject fork(ThreadContext context, IRubyObject recv, Block block) {
return RubyKernel.fork(context, recv, block);
Expand Down
Loading

0 comments on commit 8e69949

Please sign in to comment.