Created
June 13, 2012 06:54
-
-
Save nahi/2922421 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
| % mkdir foo | |
| % echo 'p [__FILE__, __LINE__, File.read(File.expand_path("./baz.txt", File.dirname(__FILE__)))]' > foo/bar.rb | |
| % echo hello,world > foo/baz.txt | |
| % jar -cf foo.jar foo | |
| % rm -rf foo | |
| % jruby -e '$LOAD_PATH << "foo.jar"; require "foo/bar"' | |
| ["jar:file:foo.jar!/foo/bar.rb", 1, "hello,world\n"] | |
| % mkdir foo | |
| % echo 'p [__FILE__, __LINE__, File.read(File.expand_path("./baz.txt", File.dirname(__FILE__)))]' > foo/bar.rb | |
| % echo hello,world > foo/baz.txt | |
| % jar -cf foo.jar foo | |
| % mkdir a b | |
| % cp -p foo.jar a | |
| % cp -p foo.jar b | |
| % rm -rf foo foo.jar | |
| % jruby -e '$:.concat(["a/foo.jar", "b/foo.jar"]); require "foo/bar"' | |
| ["jar:file:a/foo.jar!/foo/bar.rb", 1, "hello,world\n"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment