summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--load.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f03c3cc0c2..d40ea3c0c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/load.c b/load.c
index 8693aef8ae..8e66a75718 100644
--- a/load.c
+++ b/load.c
@@ -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 {