Skip to content

Commit

Permalink
More backticks
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Dec 19, 2024
1 parent 85a281b commit 9f70c5a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyBignum.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public static long big2long(RubyBignum val) {
BigInteger big = val.value;

if (big.compareTo(LONG_MIN) < 0 || big.compareTo(LONG_MAX) > 0) {
throw val.getRuntime().newRangeError("bignum too big to convert into `long'");
throw val.getRuntime().newRangeError("bignum too big to convert into 'long'");
}
return big.longValue();
}
Expand All @@ -216,7 +216,7 @@ public static long big2ulong(RubyBignum value) {

public static long big2ulong(Ruby runtime, BigInteger big) {
if (big.compareTo(BigInteger.ZERO) < 0 || big.compareTo(ULONG_MAX) > 0) {
throw runtime.newRangeError("bignum out of range for `ulong'");
throw runtime.newRangeError("bignum out of range for 'ulong'");
}

return big.longValue();
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ public IRubyObject smartLoadNewUser(IRubyObject target, IRubyObject data) {
target.callMethod(context, "marshal_load", data);
return target;
} else {
throw typeError(context, "class ", this, " needs to have method `marshal_load'");
throw typeError(context, "class ", this, " needs to have method 'marshal_load'");
}

} else if (!(cache = searchWithCache("marshal_load")).method.isUndefined()) {
Expand Down Expand Up @@ -2906,7 +2906,7 @@ public IRubyObject smartLoadOldUser(IRubyObject data) {
if (method.call(context, this, cache.sourceModule, "respond_to?", asSymbol(context, "_load")).isTrue()) {
return callMethod(context, "_load", data);
} else {
throw typeError(context, "class ", this, " needs to have method `_load'");
throw typeError(context, "class ", this, " needs to have method '_load'");
}
} else if (!(cache = singleton.searchWithCache("_load")).method.isUndefined()) {
// real _load defined, cache and call it
Expand All @@ -2915,7 +2915,7 @@ public IRubyObject smartLoadOldUser(IRubyObject data) {

} else {
// provide an error, since it doesn't exist
throw typeError(context, "class ", this, " needs to have method `_load'");
throw typeError(context, "class ", this, " needs to have method '_load'");
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ private static StringBuilder appendSlash(final CharSequence canonicalPath) {
private static RubyString checkHome(ThreadContext context) {
IRubyObject home = context.runtime.getENV().fastARef(RubyString.newStringShared(context.runtime, RubyDir.HOME));
if (home == null || home == context.nil || ((RubyString) home).size() == 0) {
throw argumentError(context, "couldn't find HOME environment -- expanding `~'");
throw argumentError(context, "couldn't find HOME environment -- expanding '~'");
}
return (RubyString) home;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyNumeric.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public static void checkInt(IRubyObject arg, long num) {

private static void checkIntFail(Ruby runtime, long num) {
if (num < Integer.MIN_VALUE) {
throw runtime.newRangeError("integer " + num + " too small to convert to `int'");
throw runtime.newRangeError("integer " + num + " too small to convert to 'int'");
} else {
throw runtime.newRangeError("integer " + num + " too big to convert to `int'");
throw runtime.newRangeError("integer " + num + " too big to convert to 'int'");
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/api/Convert.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public static IRubyObject checkToString(ThreadContext context, IRubyObject obj)
public static int checkInt(ThreadContext context, long num) {
if (((int) num) != num) {
throw rangeError(context, "integer " + num +
(num < Integer.MIN_VALUE ? " too small to convert to `int'" : " too big to convert to `int'"));
(num < Integer.MIN_VALUE ? " too small to convert to 'int'" : " too big to convert to 'int'"));
}

return (int) num;
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ private int hereDocumentIdentifier() {
private boolean arg_ambiguous(int c) {
if (warnings.isVerbose() && Options.PARSER_WARN_AMBIGUOUS_ARGUMENTS.load()) {
if (c == '/') {
warning(ID.AMBIGUOUS_ARGUMENT, "ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator");
warning(ID.AMBIGUOUS_ARGUMENT, "ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '/' operator");
} else {
warning(ID.AMBIGUOUS_ARGUMENT, "ambiguous first argument; put parentheses or a space even after '" + (char) c + "' operator");
}
Expand Down Expand Up @@ -1594,7 +1594,7 @@ private int identifier(int c, boolean commandState) {
if (!isIdentifierChar(c)) {
StringBuilder builder = new StringBuilder();
Formatter formatter = new Formatter(builder, Locale.US);
formatter.format("Invalid char `\\x%02x' in expression", c & 0xff);
formatter.format("Invalid char '\\x%02x' in expression", c & 0xff);
compile_error(builder.toString());
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/parser/RubyParserBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ private boolean checkAssignmentInCondition(Node node) {
if (node instanceof MultipleAsgnNode || node instanceof LocalAsgnNode || node instanceof DAsgnNode || node instanceof GlobalAsgnNode || node instanceof InstAsgnNode) {
Node valueNode = ((AssignableNode) node).getValueNode();
if (isStaticContent(valueNode)) {
warning(ID.ASSIGNMENT_IN_CONDITIONAL, lexer.getFile(), valueNode.getLine(), "found `= literal' in conditional, should be ==");
warning(ID.ASSIGNMENT_IN_CONDITIONAL, lexer.getFile(), valueNode.getLine(), "found '= literal' in conditional, should be ==");
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/IOChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected FunctionalCachingCallSite initWriteSite() {
} else if (io.respondsTo("<<")) {
return new FunctionalCachingCallSite("<<");
} else {
throw new IllegalArgumentException(io.getMetaClass() + "not coercible to " + getClass().getSimpleName() + ": no `write' method");
throw new IllegalArgumentException(io.getMetaClass() + "not coercible to " + getClass().getSimpleName() + ": no 'write' method");
}
}

Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/util/cli/OutputStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public static String getPropertyHelp() {
.append("# These properties can be used to alter runtime behavior for performance\n")
.append("# or compatibility.\n")
.append("#\n")
.append("# Specify them by passing `-X<property>=<value>` to the jruby command,\n")
.append("# or put `<property>=<value>` in .jrubyrc. If passing to the java command,\n")
.append("# use the flag `-Djruby.<property>=<value>`\n")
.append("# Specify them by passing '-X<property>=<value>' to the jruby command,\n")
.append("# or put '<property>=<value>' in .jrubyrc. If passing to the java command,\n")
.append("# use the flag '-Djruby.<property>=<value>'\n")
.append("#\n")
.append("# This output is the current settings as a valid .jrubyrc file.\n");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public void testRubyExceptionUsingEmbedAdapter() {
evaler.eval(context.runtime, "no_method_with_this_name");
fail("expected to throw");
} catch (RaiseException re) {
assertEquals("(NameError) undefined local variable or method `no_method_with_this_name' for main:Object", re.getMessage());
assertEquals("(NameError) undefined local variable or method 'no_method_with_this_name' for main:Object", re.getMessage());
}
}

Expand Down

0 comments on commit 9f70c5a

Please sign in to comment.