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: 7d954daeda10
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c885d6f193e4
Choose a head ref
  • 18 commits
  • 25 files changed
  • 2 contributors

Commits on Feb 27, 2015

  1. Copy the full SHA
    026d1d9 View commit details
  2. Copy the full SHA
    ac6a9de View commit details
  3. Copy the full SHA
    317e9ba View commit details
  4. Copy the full SHA
    a3d28b8 View commit details
  5. test asserting that concurrent proxy initialization does dispatch met…

    …hods correctly
    
    closing #2014
    kares committed Feb 27, 2015
    Copy the full SHA
    0d1c338 View commit details

Commits on Mar 2, 2015

  1. Copy the full SHA
    2f5ff5c View commit details
  2. Copy the full SHA
    f857e70 View commit details
  3. Copy the full SHA
    61acccd View commit details
  4. Copy the full SHA
    db7268b View commit details
  5. Copy the full SHA
    679277d View commit details
  6. Copy the full SHA
    342571a View commit details
  7. Copy the full SHA
    0f3c822 View commit details
  8. Copy the full SHA
    875b25a View commit details
  9. minor (micro-bm) improvements in RubyToJavaInvoker's consturctor - le…

    …ss allocations
    
    - use IntHashMap (internally) to avoid integer "boxing"
    - instantiate varargs list on demand if it's needed
    kares committed Mar 2, 2015
    Copy the full SHA
    45f9045 View commit details
  10. Only consider breaks that originated from this proc's frame.

    The old logic here was turning all breaks that pass through an
    escaped proc into LongJumpError, even if they originated in a
    different frame/proc that could still validly handle the break.
    This commit modifies the logic to ignore the exception altogether
    (re-throwing it) if it is not associated with this proc/frame (by
    checking jumpTarget).
    
    Fixes #1270
    headius committed Mar 2, 2015
    Copy the full SHA
    e61b737 View commit details
  11. Merge remote-tracking branch 'origin/jruby-1_7'

    Conflicts:
    	core/src/main/java/org/jruby/RubyProc.java
    	core/src/main/java/org/jruby/javasupport/JavaMethod.java
    	core/src/main/java/org/jruby/javasupport/JavaSupport.java
    
    This commit puts JavaSupport back the way it was, so we can git mv
    instead and get merging across that move.
    headius committed Mar 2, 2015
    Copy the full SHA
    2366bd6 View commit details
  12. Copy the full SHA
    a8522d9 View commit details
  13. Copy the full SHA
    c885d6f View commit details
9 changes: 5 additions & 4 deletions core/src/main/java/org/jruby/RubyModule.java
Original file line number Diff line number Diff line change
@@ -452,24 +452,25 @@ public String getBaseName() {
*/
public void setBaseName(String name) {
baseName = name;
cachedName = null;
}

/**
* Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.
*
*
* Ruby C equivalent = "classname"
*
*
* @return The generated class name
*/
public String getName() {
if (cachedName != null) return cachedName;
return calculateName();
}

/**
* Get the "simple" name for the class, which is either the "base" name or
* the "anonymous" class name.
*
*
* @return the "simple" name of the class
*/
public String getSimpleName() {
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
import java.lang.reflect.Method;
import java.util.List;

import org.jruby.Ruby;
import org.jruby.RubyModule;
import org.jruby.RubyProc;
import org.jruby.java.proxies.JavaProxy;
@@ -26,7 +25,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
JavaProxy proxy = castJavaProxy(self);

int len = args.length;
Object[] convertedArgs = new Object[len];
final Object[] convertedArgs;
JavaMethod method = (JavaMethod)findCallable(self, name, args, len);
if (method.isVarArgs()) {
len = method.getParameterTypes().length - 1;
@@ -82,6 +81,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
return method.invokeDirect(context, proxy.getObject(), cArg0, cArg1, cArg2);
}

@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
if (block.isGiven()) {
JavaProxy proxy = castJavaProxy(self);
15 changes: 8 additions & 7 deletions core/src/main/java/org/jruby/java/invokers/MethodInvoker.java
Original file line number Diff line number Diff line change
@@ -9,33 +9,34 @@
import org.jruby.javasupport.JavaMethod;

public abstract class MethodInvoker extends RubyToJavaInvoker {

MethodInvoker(RubyModule host, List<Method> methods) {
super(host, methods.toArray(new Method[methods.size()]));
trySetAccessible(getAccessibleObjects());
}

MethodInvoker(RubyModule host, Method method) {
super(host, new Method[] {method});
super(host, new Method[] { method });
trySetAccessible(getAccessibleObjects());
}

@Override
protected JavaCallable createCallable(Ruby ruby, Member member) {
return JavaMethod.create(ruby, (Method)member);
protected final JavaCallable createCallable(Ruby runtime, Member member) {
return JavaMethod.create(runtime, (Method) member);
}

@Override
protected JavaCallable[] createCallableArray(JavaCallable callable) {
return new JavaMethod[] {(JavaMethod)callable};
protected final JavaCallable[] createCallableArray(JavaCallable callable) {
return new JavaMethod[] { (JavaMethod) callable };
}

@Override
protected JavaCallable[] createCallableArray(int size) {
protected final JavaCallable[] createCallableArray(int size) {
return new JavaMethod[size];
}

@Override
protected JavaCallable[][] createCallableArrayArray(int size) {
protected final JavaCallable[][] createCallableArrayArray(int size) {
return new JavaMethod[size][];
}

Loading