[#25976] tnono dumps core — nobu@...
なかだです。
16 messages
2005/04/02
[#25977] Re: tnono dumps core
— Masaki Suketa <masaki.suketa@...>
2005/04/03
助田です。
[#25978] Re: tnono dumps core
— nobu@...
2005/04/03
なかだです。
[#25979] Re: tnono dumps core
— Hidetoshi NAGAI <nagai@...>
2005/04/03
永井@知能.九工大です.
[#25980] Re: tnono dumps core
— nobu@...
2005/04/03
なかだです。
[#25982] Re: tnono dumps core
— Hidetoshi NAGAI <nagai@...>
2005/04/04
永井@知能.九工大です.
[#25981] tktable doesn't have selection_present — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
9 messages
2005/04/03
[#25986] Re: tktable doesn't have selection_present
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/04
山本です。
[#25988] Re: tktable doesn't have selection_present
— Hidetoshi NAGAI <nagai@...>
2005/04/04
永井@知能.九工大です.
[#25989] Re: tktable doesn't have selection_present
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/04
山本です。
[#25998] ruby 1.8.3 preview予定 — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
45 messages
2005/04/07
[#25999] irb マージ[Re: ruby 1.8.3 preview予定]
— keiju@... (石塚圭樹)
2005/04/07
けいじゅ@いしつかです.
[#26011] bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/10
山本です。
[#26012] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/10
なかだです。
[#26013] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/11
山本です。
[#26014] Re: bcc32、win32 での install-doc の動作
— "U.Nakamura" <usa@...>
2005/04/11
こんにちは、なかむら(う)です。
[#26034] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/12
山本です。
[#26035] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/12
山本です。
[#26036] Re: bcc32、win32 での install-doc の動作
— "U.Nakamura" <usa@...>
2005/04/12
こんにちは、なかむら(う)です。
[#26040] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/13
なかだです。
[#26041] Re: bcc32、win32 での install-doc の動作
— "U.Nakamura" <usa@...>
2005/04/13
こんにちは、なかむら(う)です。
[#26042] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/13
なかだです。
[#26043] Re: bcc32、win32 での install-doc の動作
— "U.Nakamura" <usa@...>
2005/04/13
こんにちは、なかむら(う)です。
[#26045] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/13
なかだです。
[#26049] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/14
山本です。
[#26051] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/14
なかだです。
[#26059] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/14
山本です。
[#26060] Re: bcc32、win32 での install-doc の動作
— nobu@...
2005/04/15
なかだです。
[#26067] Re: bcc32、win32 での install-doc の動作
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2005/04/15
山本です。
[#26047] "Florian Frank": Small 1.9 fixes — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
10 messages
2005/04/13
[#26048] Re: "Florian Frank": Small 1.9 fixes
— Yukihiro Matsumoto <matz@...>
2005/04/13
[#26050] Re: "Florian Frank": Small 1.9 fixes
— keiju@... (石塚圭樹)
2005/04/14
けいじゅ@いしつかです.
[#26079] absolute path in $LOADED_FEATURES — nobu@...
なかだです。
6 messages
2005/04/18
[#26096] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIGbindings — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
4 messages
2005/04/23
[#26100] FileUtils.rm_rf security problem — Tanaka Akira <akr@...17n.org>
ふと、CVE で perl 関係のを見ていたら、File::Path の rmtree に関するも
21 messages
2005/04/26
[#26101] Re: FileUtils.rm_rf security problem
— Yukihiro Matsumoto <matz@...>
2005/04/26
まつもと ゆきひろです
[#26102] Re: FileUtils.rm_rf security problem
— Tanaka Akira <akr@...17n.org>
2005/04/26
[#26103] Re: FileUtils.rm_rf security problem
— Yukihiro Matsumoto <matz@...>
2005/04/26
まつもと ゆきひろです
[#26190] Re: FileUtils.rm_rf security problem
— Minero Aoki <aamine@...>
2005/05/20
青木です。
[#26191] Re: FileUtils.rm_rf security problem
— Tanaka Akira <akr@...17n.org>
2005/05/20
In article <20050520171837N.aamine@loveruby.net>,
[#26192] Re: FileUtils.rm_rf security problem
— Minero Aoki <aamine@...>
2005/05/20
青木です。
[#26197] Re: FileUtils.rm_rf security problem
— Minero Aoki <aamine@...>
2005/05/21
青木です。
[#26234] Re: FileUtils.rm_rf security problem
— Tanaka Akira <akr@...17n.org>
2005/05/26
In article <20050526081855Q.aamine@loveruby.net>,
[#26237] Re: FileUtils.rm_rf security problem
— Minero Aoki <aamine@...>
2005/05/26
青木です。
[#26238] Re: FileUtils.rm_rf security problem
— Tanaka Akira <akr@...17n.org>
2005/05/26
In article <20050526203322Z.aamine@loveruby.net>,
[#26105] close(2) without flushing buffer for redirection in child process — Tomoaki NISHIYAMA <tomoakin@...>
ruby-devの皆様
3 messages
2005/04/27
[#26113] race condition in fixnum..fixnum ? — Tanaka Akira <akr@...17n.org>
例によってとあるソフトウェアで core を吐いたので調べたところ、
5 messages
2005/04/30
[ruby-dev:26079] absolute path in $LOADED_FEATURES
From:
nobu@...
Date:
2005-04-18 14:43:30 UTC
List:
ruby-dev #26079
なかだです。
requireされたファイルの__FILE__をフルパスにしてみました。
これをやるまで気づいてなかったんですが、extmk.rbで設定している
$:は相対パスなので、ext/**/extconf.rbからは既にrequire済のもの
しか使えなくなっています。
Index: eval.c
===================================================================
RCS file: /cvs/ruby/src/ruby/eval.c,v
retrieving revision 1.771
diff -U2 -p -r1.771 eval.c
--- eval.c 18 Apr 2005 06:38:30 -0000 1.771
+++ eval.c 18 Apr 2005 14:37:40 -0000
@@ -6861,6 +6861,6 @@ rb_f_require(obj, fname)
static int
-search_required(fname, featurep, path)
- VALUE fname, *featurep, *path;
+search_required(fname, path)
+ VALUE fname, *path;
{
VALUE tmp;
@@ -6868,5 +6868,4 @@ search_required(fname, featurep, path)
int type;
- *featurep = fname;
*path = 0;
ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
@@ -6874,5 +6873,11 @@ search_required(fname, featurep, path)
if (strcmp(".rb", ext) == 0) {
if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
- if (*path = rb_find_file(fname)) return 'r';
+ if (tmp = rb_find_file(fname)) {
+ tmp = rb_file_expand_path(tmp, Qnil);
+ ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
+ if (!rb_feature_p(ftptr, ext, Qtrue))
+ *path = tmp;
+ return 'r';
+ }
return 0;
}
@@ -6880,10 +6885,11 @@ search_required(fname, featurep, path)
if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
- *featurep = tmp;
#ifdef DLEXT2
OBJ_FREEZE(tmp);
if (rb_find_file_ext(&tmp, loadable_ext+1)) {
- *featurep = tmp;
- *path = rb_find_file(tmp);
+ tmp = rb_file_expand_path(tmp, Qnil);
+ ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
+ if (!rb_feature_p(ftptr, ext, Qfalse))
+ *path = tmp;
return 's';
}
@@ -6891,5 +6897,9 @@ search_required(fname, featurep, path)
rb_str_cat2(tmp, DLEXT);
OBJ_FREEZE(tmp);
- if (*path = rb_find_file(tmp)) {
+ if (tmp = rb_find_file(tmp)) {
+ tmp = rb_file_expand_path(tmp, Qnil);
+ ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
+ if (!rb_feature_p(ftptr, ext, Qfalse))
+ *path = tmp;
return 's';
}
@@ -6898,10 +6908,19 @@ search_required(fname, featurep, path)
else if (IS_DLEXT(ext)) {
if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
- if (*path = rb_find_file(fname)) return 's';
+ if (tmp = rb_find_file(fname)) {
+ tmp = rb_file_expand_path(tmp, Qnil);
+ ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
+ if (!rb_feature_p(ftptr, ext, Qfalse))
+ *path = tmp;
+ return 's';
+ }
}
}
tmp = fname;
- switch (type = rb_find_file_ext(&tmp, loadable_ext)) {
+ type = rb_find_file_ext(&tmp, loadable_ext);
+ tmp = rb_file_expand_path(tmp, Qnil);
+ switch (type) {
case 0:
+ ftptr = RSTRING(tmp)->ptr;
if ((ext = rb_feature_p(ftptr, 0, Qfalse))) {
type = strcmp(".rb", ext);
@@ -6911,8 +6930,7 @@ search_required(fname, featurep, path)
default:
- *featurep = tmp;
ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
if (rb_feature_p(ftptr, ext, !--type)) break;
- *path = rb_find_file(tmp);
+ *path = tmp;
}
return type ? 's' : 'r';
@@ -6948,5 +6966,5 @@ rb_require_safe(fname, safe)
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
- VALUE feature, path;
+ VALUE path;
long handle;
int found;
@@ -6955,7 +6973,7 @@ rb_require_safe(fname, safe)
FilePathValue(fname);
*(volatile VALUE *)&fname = rb_str_new4(fname);
- found = search_required(fname, &feature, &path);
+ found = search_required(fname, &path);
if (found) {
- if (!path || load_wait(RSTRING(feature)->ptr)) {
+ if (!path || load_wait(RSTRING(path)->ptr)) {
result = Qfalse;
}
@@ -6969,5 +6987,5 @@ rb_require_safe(fname, safe)
}
/* partial state */
- ftptr = ruby_strdup(RSTRING(feature)->ptr);
+ ftptr = ruby_strdup(RSTRING(path)->ptr);
st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
rb_load(path, 0);
@@ -6985,5 +7003,5 @@ rb_require_safe(fname, safe)
break;
}
- rb_provide_feature(feature);
+ rb_provide_feature(path);
result = Qtrue;
}
Index: file.c
===================================================================
RCS file: /cvs/ruby/src/ruby/file.c,v
retrieving revision 1.198
diff -U2 -p -r1.198 file.c
--- file.c 11 Apr 2005 13:30:10 -0000 1.198
+++ file.c 18 Apr 2005 14:16:48 -0000
@@ -4143,5 +4143,5 @@ rb_find_file_ext(filep, ext)
found = dln_find_file(StringValueCStr(fname), path);
if (found && file_load_ok(found)) {
- *filep = fname;
+ *filep = rb_str_new2(found);
return j+1;
}
Index: ext/extmk.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v
retrieving revision 1.77
diff -U2 -p -r1.77 extmk.rb
--- ext/extmk.rb 17 Apr 2005 14:58:00 -0000 1.77
+++ ext/extmk.rb 18 Apr 2005 14:16:48 -0000
@@ -20,10 +20,10 @@ $extupdate = false
$compiled = {}
-$:.replace ["."]
+$:.replace([Dir.pwd])
require 'rbconfig'
-srcdir = File.dirname(File.dirname(__FILE__))
+srcdir = File.expand_path("../..", __FILE__)
-$:.replace [srcdir, srcdir+"/lib", "."]
+$:.unshift(srcdir, srcdir+"/lib")
$topdir = "."
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦