diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 10:13:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 10:13:14 +0000 |
commit | 3dea38333c0aec312f949d11e407ead6b81f8e62 (patch) | |
tree | 5cf39c72b31e1c6980100c3acec16a839b0ff77a /eval.c | |
parent | dcb13f8e17f646d1878a691130b3428c25564d29 (diff) |
* eval.c (search_required): expand home relative path first.
[ruby-core:29610]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -7411,9 +7411,13 @@ search_required(fname, featurep, path) const char *ext, *ftptr; int type; + if (*(ftptr = RSTRING_PTR(fname)) == '~') { + fname = rb_file_expand_path(fname, Qnil); + ftptr = RSTRING_PTR(fname); + } *featurep = fname; *path = 0; - ext = strrchr(ftptr = RSTRING_PTR(fname), '.'); + ext = strrchr(ftptr, '.'); if (ext && !strchr(ext, '/')) { if (strcmp(".rb", ext) == 0) { if (rb_feature_p(ftptr, ext, Qtrue)) { |