summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-29 17:14:18 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-29 17:14:18 +0000
commitb28b55633f5233a3cdbe20a5b765e2b932c2e5c1 (patch)
treed37b0ebb7c8913c30e0b7aa0e3bf7d2d4938c4b7
parentf75d4ca72cb3a9f273d0dc16b0b5a4ea49eb3daa (diff)
merges r21875 from trunk into ruby_1_9_1.
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--configure.in2
-rw-r--r--load.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bcc2f5382..017c80b8fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-Thu Jan 29 14:08:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+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.
* configure.in (OBJCOPY): not used on Windows.
diff --git a/configure.in b/configure.in
index f409ab823c..31f2593751 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,7 @@ AC_ARG_WITH(baseruby,
[
BASERUBY="ruby"
])
-test "`$BASERUBY -e 'p 42' 2>/dev/null`" = 42 ||
+test "`RUBYOPT=- $BASERUBY -e 'p 42' 2>/dev/null`" = 42 ||
BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
AC_SUBST(BASERUBY)
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 {