Created
May 26, 2009 16:53
-
-
Save vishnugopal/118162 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
def import | |
puts "a" | |
end | |
require 'java' | |
import java.lang.System | |
puts "Worked!" | |
---- | |
vishnu@Elena ~/Code/Sandbox/test% jruby test.rb | |
Worked! | |
vishnu@Elena ~/Code/Sandbox/test% ruby test.rb | |
test.rb:6:in `require': no such file to load -- java (LoadError) | |
from test.rb:6 | |
zsh: exit 1 ruby test.rb | |
vishnu@Elena ~/Code/Sandbox/test% touch "java.rb" | |
vishnu@Elena ~/Code/Sandbox/test% ruby test.rb | |
test.rb:7: undefined local variable or method `java' for main:Object (NameError) | |
zsh: exit 1 ruby test.rb | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment