Created
December 9, 2008 02:18
-
-
Save jarib/33726 to your computer and use it in GitHub Desktop.
This file contains 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
# `javac InterfaceA.java InterfaceB.java` | |
require "java" | |
require "InterfaceA" | |
require "InterfaceB" | |
class Foo | |
include Java::Foo::InterfaceA | |
include Java::Foo::InterfaceB | |
def a | |
p :a | |
end | |
def b | |
p :b | |
end | |
end | |
require "test/unit" | |
class TestLibraryFileName < Test::Unit::TestCase | |
def test_case_name | |
assert false | |
end | |
end | |
p $! # => #<TypeError: <=> requires JavaClass (NilClass given)> | |
p $@ # => ["foo.rb:12:in `append_features'", "foo.rb:12"] |
This file contains 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 foo; | |
public interface InterfaceA { | |
void a(); | |
} |
This file contains 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 foo; | |
public interface InterfaceB { | |
void b(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment