summaryrefslogtreecommitdiff
path: root/prelude.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 00:32:22 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 00:32:22 (GMT)
commit853dd6cabe692251376271421be433d68bea2865 (patch)
tree85adecadc51445c95962b556da3f34cfd0c639da /prelude.rb
parentf86cca6f55ce0e9ec50bc1cb61718d02ebe31e10 (diff)
* prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
* include/ruby/intern.h: declare rb_dir_getwd. * dir.c (rb_dir_getwd): copied from dir_s_getwd to export. (dir_s_getwd): use rb_dir_getwd. * file.c (rb_file_s_realpath): new method File.realpath. (rb_file_s_realdirpath): new method File.realdirpath. * lib/pathname.rb (Pathname#realpath): use File.realpath. (Pathname#realdirpath): use File.realdirpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'prelude.rb')
-rw-r--r--prelude.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/prelude.rb b/prelude.rb
index a9e9e3c..679e831 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -32,7 +32,7 @@ module Kernel
if /\A\((.*)\)/ =~ file # eval, etc.
raise LoadError, "require_relative is called in #{$1}"
end
- absolute_feature = File.expand_path(File.join(File.dirname(file), relative_feature))
+ absolute_feature = File.join(File.dirname(File.realpath(file)), relative_feature)
require absolute_feature
end
end