Skip to content

Instantly share code, notes, and snippets.

@enebo
Created October 15, 2015 17:24
Show Gist options
  • Save enebo/d829549a3a89cb544f6a to your computer and use it in GitHub Desktop.
Save enebo/d829549a3a89cb544f6a to your computer and use it in GitHub Desktop.
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