Created
December 17, 2010 16:51
-
-
Save qmx/745254 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError in 'Java::XPTO should use the same generated class for wrapping different interfaces' | |
cannot convert instance of class org.jruby.RubyObject to interface java.util.concurrent.Callable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package java_integration.fixtures; | |
import java.util.concurrent.Callable; | |
public class InterfaceWrapper { | |
public static Callable giveMeBack2(Callable call) { | |
return call; | |
} | |
public static Runnable giveMeBack(Runnable runnable) { | |
return runnable; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "whatever" do | |
it "should use the same generated class for wrapping different interfaces" do | |
class BugTest | |
def run | |
end | |
def call | |
end | |
end | |
expected1 = InterfaceWrapper.give_me_back2(InterfaceWrapper.give_me_back(BugTest.new)) | |
expected2 = InterfaceWrapper.give_me_back(InterfaceWrapper.give_me_back2(BugTest.new)) | |
expected1.java_class.should == expected2.java_class | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment