From 39056c6f030808ec17d8387f38c39bcdca9d23bf Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 7 Jan 2014 17:21:16 -0600 Subject: [PATCH] Revert "Classpath urls should still use expand_path to properly canonicalize the path. This fixes no reported issue" This reverts commit 429149e7f5b9114ff8f6326bd72fde5a1f0a941b. --- core/src/main/ruby/jruby/kernel/kernel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/ruby/jruby/kernel/kernel.rb b/core/src/main/ruby/jruby/kernel/kernel.rb index e47e540993f..b3f96bb38d1 100644 --- a/core/src/main/ruby/jruby/kernel/kernel.rb +++ b/core/src/main/ruby/jruby/kernel/kernel.rb @@ -12,8 +12,8 @@ def require_relative(relative_arg) # know about classpath: paths. if file =~ /^classpath:(.*)/ dir = File.dirname($1) - dir = '' if dir == '.' - absolute_feature = "classpath:" + File.expand_path(relative_arg, dir) + dir = dir == '.' ? "" : dir + "/" + absolute_feature = "classpath:#{dir}#{relative_arg}" else absolute_feature = File.expand_path(relative_arg, File.dirname(file)) end