Created
October 15, 2015 17:24
-
-
Save enebo/d829549a3a89cb544f6a 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
diff --git a/core/src/main/ruby/jruby/kernel/kernel.rb b/core/src/main/ruby/jruby/kernel/kernel.rb | |
index b4dd5e13..ad0466f 100644 | |
--- a/core/src/main/ruby/jruby/kernel/kernel.rb | |
+++ b/core/src/main/ruby/jruby/kernel/kernel.rb | |
@@ -6,6 +6,7 @@ module Kernel | |
caller.first.rindex(/:\d+:in /) | |
file = $` # just the filename | |
+ file.gsub!(/\.[^\/.]+$/), '') | |
raise LoadError, "cannot infer basepath" if /\A\((.*)\)/ =~ file # eval etc. | |
absolute_feature = File.expand_path(relative_arg, File.dirname(File.realpath(file))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment