Skip to content

Commit

Permalink
[refactor] correct a typo that has made it being a public method
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Jun 1, 2018
1 parent b087544 commit bbed5b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions core/src/main/java/org/jruby/RubyModule.java
Expand Up @@ -3895,10 +3895,6 @@ public IRubyObject getConstantNoConstMissing(String name, boolean inherit) {
return getConstantNoConstMissing(name, inherit, true);
}

public IRubyObject getConstantNoConstMissingSKipAutoload(String name) {
return getConstantSkipAutoload(name, true, true);
}

public IRubyObject getConstantNoConstMissing(String name, boolean inherit, boolean includeObject) {
IRubyObject constant = iterateConstantNoConstMissing(name, this, inherit, true);

Expand All @@ -3909,6 +3905,15 @@ public IRubyObject getConstantNoConstMissing(String name, boolean inherit, boole
return constant;
}

public final IRubyObject getConstantNoConstMissingSkipAutoload(String name) {
return getConstantSkipAutoload(name, true, true);
}

@Deprecated
public IRubyObject getConstantNoConstMissingSKipAutoload(String name) {
return getConstantSkipAutoload(name, true, true);
}

// returns UNDEF for un-loaded autoload constants
private IRubyObject getConstantSkipAutoload(String name, boolean inherit, boolean includeObject) {
IRubyObject constant = iterateConstantNoConstMissing(name, this, inherit, false);
Expand Down
Expand Up @@ -64,7 +64,7 @@ public String[] toStringNonOperandArgs() {

private Object cache(Ruby runtime, RubyModule module) {
String id = getId();
Object constant = module.getConstantNoConstMissingSKipAutoload(id);
Object constant = module.getConstantNoConstMissingSkipAutoload(id);
if (constant == null) {
constant = UndefinedValue.UNDEFINED;
} else {
Expand Down
Expand Up @@ -177,7 +177,7 @@ public IRubyObject inheritanceSearchConst(ThreadContext context, IRubyObject cmV
}

// Inheritance lookup
IRubyObject constant = module.getConstantNoConstMissingSKipAutoload(name);
IRubyObject constant = module.getConstantNoConstMissingSkipAutoload(name);

if (constant == null) {
constant = UndefinedValue.UNDEFINED;
Expand Down Expand Up @@ -207,7 +207,7 @@ public IRubyObject noCacheInheritanceSearchConst(ThreadContext context, IRubyObj

// Inheritance lookup

IRubyObject constant = module.getConstantNoConstMissingSKipAutoload(name);
IRubyObject constant = module.getConstantNoConstMissingSkipAutoload(name);

if (constant == null) {
constant = UndefinedValue.UNDEFINED;
Expand Down

0 comments on commit bbed5b2

Please sign in to comment.