Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1eedf72882f3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 945fcbd65ec2
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 8, 2014

  1. Copy the full SHA
    91bc487 View commit details
  2. Echo $HOME on Travis.

    headius committed Dec 8, 2014
    Copy the full SHA
    945fcbd View commit details
Showing with 10 additions and 4 deletions.
  1. +1 −0 .travis.yml
  2. +9 −4 core/src/main/java/org/jruby/RubyClass.java
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ language: java
before_script:
- unset GEM_PATH GEM_HOME IRBRC
- "export PATH=`pwd`/bin:$PATH"
- echo $HOME

jdk:
- oraclejdk7
13 changes: 9 additions & 4 deletions core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -631,7 +631,7 @@ public IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, Strin
return null;

me = searchMethod(name);
if (!checkFuncallCallable(context, me)) {
if (!checkFuncallCallable(context, me, CallType.FUNCTIONAL, self)) {
return checkFuncallMissing(context, klass, self, name);
}
return me.call(context, self, klass, name);
@@ -676,9 +676,14 @@ private static boolean checkFuncallRespondTo(ThreadContext context, RubyClass kl
}

// MRI: check_funcall_callable
public static boolean checkFuncallCallable(ThreadContext context, DynamicMethod method) {
// FIXME: MRI actually checks protectedness here too and has more complex private logic
return method != null && !method.isUndefined() && !method.getVisibility().isPrivate();
public static boolean checkFuncallCallable(ThreadContext context, DynamicMethod method, CallType callType, IRubyObject self) {
return rbMethodCallStatus(context, method, callType, self);
}

// MRI: rb_method_call_status
// FIXME: Partial impl because we don't have these "NOEX" flags
public static boolean rbMethodCallStatus(ThreadContext context, DynamicMethod method, CallType callType, IRubyObject self) {
return method != null && !method.isUndefined() && method.isCallableFrom(self, callType);
}

private static IRubyObject checkFuncallMissing(ThreadContext context, RubyClass klass, IRubyObject self, String method, IRubyObject... args) {