[#26942] core dump with ripper — Tanaka Akira <akr@...17n.org>
ripper で次のように core を吐くことがあるようです。
[#26952] ripper problems. — Tanaka Akira <akr@...17n.org>
ついでに、
[#26954] Re: core dump with ripper — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#26962] Re: about Ruby-GetText — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#26963] sprintf does not warn in verbose mode. — sheepman <sheepman@...>
こんにちは、sheepman です。
[#26975] [proposal] ANSI style function — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
まつもと ゆきひろです
山本です。
なかだです。
山本です。
まつもと ゆきひろです
山本です。
山本です。
山本です。
まつもと ゆきひろです
山本です。
山本です。
まつもと ゆきひろです
山本です。
In message <20050909220539.E1B26BB8.ocean@m2.ccsnet.ne.jp>
山本です。
山本です。
まつもと ゆきひろです
山本です。
山本です。
まつもと ゆきひろです
山本です。
まつもと ゆきひろです
山本です。
まつもと ゆきひろです
山本です。
山本です。
山本です。
山本です。
まつもと ゆきひろです
山本です。
山本です。
なかだです。
[#26984] elimination of "extern int errno;" — Takahiro Kambe <taca@...>
こんにちは。
In message <20050908.120716.71112483.taca@back-street.net>
まつもと ゆきひろです
In message <1126489480.743964.31599.nullmailer@x31.priv.netlab.jp>
In message <20050912.104954.92585084.taca@back-street.net>
まつもと ゆきひろです
In article <1126491408.019719.1052.nullmailer@x31.priv.netlab.jp>,
In message <87wtlmyasi.fsf@m17n.org>
In article <20050916.201819.92561710.taca@back-street.net>,
In message <878xxx6tab.fsf@m17n.org>
こんにちは、なかむら(う)です。
まつもと ゆきひろです
高橋征義です。
まつもと ゆきひろです
高橋征義です。
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
[#27051] fail on test/rss — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
なかだです。
まつもと ゆきひろです
まつもと ゆきひろです
まつもと ゆきひろです
[#27123] test/socket/test_tcp.rb blocks on NetBSD — Tanaka Akira <akr@...17n.org>
2005-09-16 から NetBSD で test/socket/test_tcp.rb がブロックするようになっています。
[#27139] ruby-1.8.3 status for release — Masayoshi Takahashi <maki@...>
高橋征義です。
卜部です。
卜部です。
こんにちは、sheepman です。
小西 弘将です。
Masayoshi Takahashi wrote:
助田です。
高橋征義です。
山本です。
こんにちは、なかむら(う)です。
かわじ、です。
山本です。
卜部です。
[#27140] [PATCH] File#chown(nil, nil) — Minero Aoki <aamine@...>
青木です。
[#27141] Interix3 (SFU)サポート — Takahiro Kambe <taca@...>
おはようございます。
[#27150] test_readline.rb blocks on NetBSD. — Tanaka Akira <akr@...17n.org>
NetBSD で、ひさしぶりに端末から ruby を build したところ、test-all 中
前田です。
[#27242] Ruby 1.8.3 released — Yukihiro Matsumoto <matz@...>
Hello Rubyists,
[#27248] glob from command line still broken in djgpp? — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
[#27251] 脆弱性レポート翻訳者募集 — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
In message <1127268581.886018.27376.nullmailer@x31.priv.netlab.jp>
[#27275] release schedule plan for 1.8.4 — "NARUSE, Yui" <naruse@...>
成瀬です。
[#27281] env -i make; fails. — "URABE Shyouhei aka.mput" <root@...>
うらべです。
なかだです。
In article <TYOMLEM041XvpFVjCRG00000109@tyomlvem02.e2k.ad.ge.com>,
なかだです。
In article <TYOMLEM04ryWtIIZS2T0000010a@tyomlvem02.e2k.ad.ge.com>,
[#27297] warning of yaml/basenode.rb — 雪見酒 <yukimi_sake@...>
こちらでははじめまして、雪見酒です。
[#27302] warning: 'cdecl' attribute directive ignored — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#27321] RubyGemsとOS platformとの関係 — Daigo Moriwaki <techml@...>
こんにちは、森脇です。
なかだです。
まつもと ゆきひろです
西尾瑞穂 と言います。
まつもと ゆきひろです
In article <1127872084.608903.6359.nullmailer@x31.priv.netlab.jp>,
まつもと ゆきひろです
森脇です。
Daigo Moriwaki wrote:
In article <433CC31E.20802@ruby-lang.org>,
Tanaka Akira wrote:
まつもと ゆきひろです
In article <433D4CED.9030005@ruby-lang.org>,
Tanaka Akira wrote:
In article <433E4AF0.5020308@ruby-lang.org>,
[#27324] ext/digest on DrafonFly — Takahiro Kambe <taca@...>
こんにちは。
[#27331] possible SEGV in rb_autoload_load? — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
[#27334] File#read にゴミがつく — Yusuke ENDOH <mame@...>
はじめまして、遠藤侑介と申します。
なかだです。
[ruby-dev:26938] Re: fail on make install
なかだです。
At Thu, 1 Sep 2005 07:39:10 +0900,
nobu@ruby-lang.org wrote in [ruby-dev:26933]:
> 後から気づいたんですが、[ruby-dev:26930]のようにインタプリタが
> 必要な部分とそうでない部分を分けるなら、rb_sys_warning()もなん
> とかしないといけませんね。初期化時点ではruby_verboseはfalseなの
> で問題は出てませんが。
ポインタで切り替えようかと思いましたが、win32だとstat()などがマ
クロになっているので、こんなところでどうでしょうか。
# やっぱりdefファイルで名前を挿げ替えるようにしたほうがいいかも。
Index: dir.c
===================================================================
RCS file: /cvs/ruby/src/ruby/dir.c,v
retrieving revision 1.143
diff -U2 -p -r1.143 dir.c
--- dir.c 30 Aug 2005 14:49:51 -0000 1.143
+++ dir.c 1 Sep 2005 03:07:28 -0000
@@ -72,4 +72,5 @@ char *strchr _((char*,char));
#define FNM_DOTMATCH 0x04
#define FNM_CASEFOLD 0x08
+#define FNM_VERBOSE 0x10
#define FNM_NOMATCH 1
@@ -924,10 +925,11 @@ dir_s_rmdir(obj, dir)
/* System call with warning */
static int
-do_stat(path, pst)
+do_stat(path, pst, flags)
const char *path;
struct stat *pst;
+ int flags;
{
int ret = stat(path, pst);
- if (ret < 0 && errno != ENOENT)
+ if (ret < 0 && (flags & FNM_VERBOSE) && errno != ENOENT)
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
@@ -936,10 +938,11 @@ do_stat(path, pst)
static int
-do_lstat(path, pst)
+do_lstat(path, pst, flags)
const char *path;
struct stat *pst;
+ int flags;
{
int ret = lstat(path, pst);
- if (ret < 0 && errno != ENOENT)
+ if (ret < 0 && (flags & FNM_VERBOSE) && errno != ENOENT)
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
@@ -948,9 +951,10 @@ do_lstat(path, pst)
static DIR *
-do_opendir(path)
+do_opendir(path, flags)
const char *path;
+ int flags;
{
DIR *dirp = opendir(path);
- if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
+ if (!dirp && (flags & FNM_VERBOSE) && errno != ENOENT && errno != ENOTDIR)
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
@@ -1169,20 +1173,5 @@ glob_func_caller(val)
}
-static int
-glob_call_func(func, path, arg)
- void (*func) _((const char *, VALUE));
- const char *path;
- VALUE arg;
-{
- int status;
- struct glob_args args;
-
- args.func = func;
- args.c = path;
- args.v = arg;
-
- rb_protect(glob_func_caller, (VALUE)&args, &status);
- return status;
-}
+#define glob_call_func(func, path, arg) (*func)(path, arg)
static int
@@ -1195,5 +1184,5 @@ glob_helper(path, dirsep, exist, isdir,
struct glob_pattern **end;
int flags;
- void (*func) _((const char *, VALUE));
+ int (*func) _((const char *, VALUE));
VALUE arg;
{
@@ -1230,5 +1219,5 @@ glob_helper(path, dirsep, exist, isdir,
if (*path) {
if (match_all && exist == UNKNOWN) {
- if (do_lstat(path, &st) == 0) {
+ if (do_lstat(path, &st, flags) == 0) {
exist = YES;
isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
@@ -1240,5 +1229,5 @@ glob_helper(path, dirsep, exist, isdir,
}
if (match_dir && isdir == UNKNOWN) {
- if (do_stat(path, &st) == 0) {
+ if (do_stat(path, &st, flags) == 0) {
exist = YES;
isdir = S_ISDIR(st.st_mode) ? YES : NO;
@@ -1265,5 +1254,5 @@ glob_helper(path, dirsep, exist, isdir,
if (magical || recursive) {
struct dirent *dp;
- DIR *dirp = do_opendir(*path ? path : ".");
+ DIR *dirp = do_opendir(*path ? path : ".", flags);
if (dirp == NULL) return 0;
@@ -1275,5 +1264,5 @@ glob_helper(path, dirsep, exist, isdir,
&& fnmatch("*", dp->d_name, flags) == 0) {
#ifndef _WIN32
- if (do_lstat(buf, &st) == 0)
+ if (do_lstat(buf, &st, flags) == 0)
new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
else
@@ -1346,9 +1335,9 @@ glob_helper(path, dirsep, exist, isdir,
}
-static int
-rb_glob2(path, flags, func, arg)
+int
+ruby_glob(path, flags, func, arg)
const char *path;
int flags;
- void (*func) _((const char *, VALUE));
+ int (*func) _((const char *, VALUE));
VALUE arg;
{
@@ -1386,32 +1375,39 @@ rb_glob2(path, flags, func, arg)
}
-struct rb_glob_args {
- void (*func) _((const char*, VALUE));
- VALUE arg;
-};
-
-static VALUE
+static int
rb_glob_caller(path, a)
const char *path;
VALUE a;
{
- struct rb_glob_args *args = (struct rb_glob_args *)a;
- (*args->func)(path, args->arg);
- return Qnil;
+ int status;
+ struct glob_args *args = (struct glob_args *)a;
+
+ args->c = path;
+ rb_protect(glob_func_caller, a, &status);
+ return status;
}
-void
-rb_glob(path, func, arg)
+static int
+rb_glob2(path, flags, func, arg)
const char *path;
- void (*func) _((const char*, VALUE));
+ int flags;
+ void (*func) _((const char *, VALUE));
VALUE arg;
{
- struct rb_glob_args args;
+ struct glob_args args;
int status;
args.func = func;
- args.arg = arg;
- status = rb_glob2(path, 0, rb_glob_caller, &args);
+ args.v = arg;
+ return ruby_glob(path, flags | FNM_VERBOSE, rb_glob_caller, (VALUE)&args);
+}
+void
+rb_glob(path, func, arg)
+ const char *path;
+ void (*func) _((const char*, VALUE));
+ VALUE arg;
+{
+ int status = rb_glob2(path, 0, func, arg);
if (status) rb_jump_tag(status);
}
Index: ruby.h
===================================================================
RCS file: /cvs/ruby/src/ruby/ruby.h,v
retrieving revision 1.118
diff -U2 -p -r1.118 ruby.h
--- ruby.h 27 Jul 2005 07:27:17 -0000 1.118
+++ ruby.h 1 Sep 2005 03:06:33 -0000
@@ -484,4 +484,5 @@ void rb_obj_infect _((VALUE,VALUE));
void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE));
+int ruby_glob _((const char*,int,int(*)(const char*,VALUE),VALUE));
VALUE rb_define_class _((const char*,VALUE));
Index: win32/win32.c
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/win32.c,v
retrieving revision 1.164
diff -U2 -p -r1.164 win32.c
--- win32/win32.c 18 Aug 2005 02:07:28 -0000 1.164
+++ win32/win32.c 1 Sep 2005 03:05:16 -0000
@@ -1024,5 +1024,5 @@ typedef struct _NtCmdLineElement {
#define NTSTRING 0x4 // element contains a quoted string
-static void
+static int
insert(const char *path, VALUE vinfo)
{
@@ -1038,4 +1038,6 @@ insert(const char *path, VALUE vinfo)
**tail = tmpcurr;
*tail = &tmpcurr->next;
+
+ return 0;
}
@@ -1062,5 +1064,5 @@ cmdglob(NtCmdLineElement *patt, NtCmdLin
if (*p == '\\')
*p = '/';
- rb_glob(buf, insert, (VALUE)&tail);
+ ruby_glob(buf, 0, insert, (VALUE)&tail);
if (buf != buffer)
free(buf);
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦