diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-29 07:32:07 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-29 07:32:07 +0000 |
commit | a301cc21cbef84cb96aa0d05c3e29c7ce825952d (patch) | |
tree | 4b1634de97526de0339b1f6c5add487f1dd941ca | |
parent | 64c89f74dd43cbfb5e511ff937de67044931d1d1 (diff) | |
download | ruby-a301cc21cbef84cb96aa0d05c3e29c7ce825952d.tar.gz ruby-a301cc21cbef84cb96aa0d05c3e29c7ce825952d.tar.xz ruby-a301cc21cbef84cb96aa0d05c3e29c7ce825952d.zip |
* load.c (rb_feature_provided): should not calculate len by pointer
subtraction because feature may be a expanded path.
[ruby-core:21267]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | load.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Jan 29 16:22:41 2009 Shugo Maeda <shugo@ruby-lang.org> + + * load.c (rb_feature_provided): should not calculate len by pointer + subtraction because feature may be a expanded path. + [ruby-core:21267] + Thu Jan 29 14:12:15 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in (BASERUBY): erases RUBYOPT at the test. @@ -128,8 +128,8 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c if (fn) *fn = 0; if (ext) { - len = ext - feature; elen = strlen(ext); + len = strlen(feature) - elen; type = rb ? 'r' : 's'; } else { |