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: 107ac4f949a3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ac3849a6ec2b
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 28, 2016

  1. make get/set exception final

    kares committed Jan 28, 2016
    Copy the full SHA
    ba911b6 View commit details
  2. Copy the full SHA
    09a2d9b View commit details
  3. Copy the full SHA
    e004f26 View commit details
  4. unused imports + a comment

    kares committed Jan 28, 2016
    Copy the full SHA
    dee7be4 View commit details
  5. Copy the full SHA
    ac3849a View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -706,7 +706,7 @@ private static IRubyObject checkFuncallMissing(ThreadContext context, RubyClass

DynamicMethod me = klass.searchMethod("respond_to_missing?");
// MRI: basic_obj_respond_to_missing ...
if ( me != null && ! me.isUndefined() ) {
if ( me != null && ! me.isUndefined() && ! me.isBuiltin() ) {
IRubyObject ret;
if (me.getArity().getValue() == 1) {
ret = me.call(context, self, klass, "respond_to_missing?", runtime.newSymbol(method));
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/exceptions/RaiseException.java
Original file line number Diff line number Diff line change
@@ -188,7 +188,7 @@ public String getMessage() {
* Gets the exception
* @return Returns a RubyException
*/
public RubyException getException() {
public final RubyException getException() {
return exception;
}

@@ -257,7 +257,7 @@ private void doSetLastError(final ThreadContext context) {
* Sets the exception
* @param newException The exception to set
*/
protected void setException(RubyException newException, boolean nativeException) {
protected final void setException(RubyException newException, boolean nativeException) {
this.exception = newException;
this.nativeException = nativeException;
}
5 changes: 1 addition & 4 deletions core/src/main/java/org/jruby/util/TypeConverter.java
Original file line number Diff line number Diff line change
@@ -48,9 +48,6 @@
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;

import java.util.Arrays;
import java.util.List;

public class TypeConverter {

/**
@@ -370,7 +367,7 @@ public static IRubyObject convertToInteger(ThreadContext context, IRubyObject va

// MRI: rb_Array
public static RubyArray rb_Array(ThreadContext context, IRubyObject val) {
IRubyObject tmp = checkArrayType(val);
IRubyObject tmp = checkArrayType(val); // to_ary

if (tmp.isNil()) {
tmp = convertToTypeWithCheck19(val, context.runtime.getArray(), "to_a");
20 changes: 0 additions & 20 deletions spec/regression/GH-1877_delete_if_updates_spec.rb

This file was deleted.

42 changes: 20 additions & 22 deletions spec/regression/GH-1962_Kernel_Array_coercion_spec.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
if RUBY_VERSION >= "1.9"
describe "GH-1962: Kernel::Array" do
it "coerces Array-like objects that define method_missing" do
o = Object.new
def o.method_missing(name, *args)
[]
end

expect(Array(o)).to eq([])
describe "GH-1962: Kernel::Array" do
it "coerces Array-like objects that define method_missing" do
o = Object.new
def o.method_missing(name, *args)
[]
end

it "coerces Array-like objects that define to_ary" do
o = Object.new
def o.to_ary
[]
end
expect(Array(o)).to eq([])
end

expect(Array(o)).to eq([])
it "coerces Array-like objects that define to_ary" do
o = Object.new
def o.to_ary
[]
end

it "coerces Array-like objects that define to_a" do
o = Object.new
def o.to_a
[]
end
expect(Array(o)).to eq([])
end

expect(Array(o)).to eq([])
it "coerces Array-like objects that define to_a" do
o = Object.new
def o.to_a
[]
end

expect(Array(o)).to eq([])
end
end
end