[#23139] backslash in string — Jun Adachi <adachi@...>
安達@沖データと申します。
8 messages
2004/03/05
[#23148] BSD make(OpenBSD3.4) で make 出来ない — KAWAJI Shinya <kawaji@...>
かわじ、です。
3 messages
2004/03/06
[#23168] File.fnmatch のリファクタリング — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
13 messages
2004/03/08
[#23175] Re: File.fnmatch のリファクタリング
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/08
山本です。
[#23176] Re: File.fnmatch のリファクタリング
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/08
山本です。
[#23184] Re: File.fnmatch のリファクタリング
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/11
山本です。
[#23187] Re: File.fnmatch のリファクタリング
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/12
山本です。
[#23171] Re: File.fnmatch のリファクタリング — kkosako@...
> -----Original Message-----
2 messages
2004/03/08
[#23173] Re: Oniguruma has been merged into ruby CVS — kkosako@...
> -----Original Message-----
4 messages
2004/03/08
[#23192] File.fnmatch と Dir.glob の非互換部分 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
19 messages
2004/03/13
[#23194] Re: File.fnmatch と Dir.glob の非互換部分
— matz@... (Yukihiro Matsumoto)
2004/03/13
まつもと ゆきひろです
[#23195] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/14
山本です。
[#23196] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/14
山本です。
[#23260] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/30
山本です。
[#23261] Re: File.fnmatch とDir.glob の非互換部分
— matz@... (Yukihiro Matsumoto)
2004/03/30
まつもと ゆきひろです
[#23265] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/30
山本です。
[#23267] Re: File.fnmatch とDir.glob の非互換部分
— matz@... (Yukihiro Matsumoto)
2004/03/30
まつもと ゆきひろです
[#23268] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/30
山本です。
[#23269] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/30
山本です。
[#23272] Re: File.fnmatch とDir.glob の非互換部分
— matz@... (Yukihiro Matsumoto)
2004/03/30
まつもと ゆきひろです
[#23273] Re: File.fnmatch とDir.glob の非互換部分
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/03/30
山本です。
[#23212] warning: fork terminates thread — Tanaka Akira <akr@...17n.org>
思い出したのですが、thread が動いている時に fork すると、
12 messages
2004/03/23
[#23213] Re: warning: fork terminates thread
— matz@... (Yukihiro Matsumoto)
2004/03/23
まつもと ゆきひろです
[#23214] Re: warning: fork terminates thread
— keiju@... (石塚圭樹)
2004/03/24
けいじゅ@いしつかです.
[#23217] Re: warning: fork terminates thread
— Tietew <tietew-ml-ruby-dev@...>
2004/03/24
[#23221] English alias — nobu.nakada@...
なかだです。
16 messages
2004/03/25
[#23226] [-0xf0000000].pack("U") again — Tanaka Akira <akr@...17n.org>
ふと、[ruby-dev:21577] で書いた
8 messages
2004/03/26
[#23227] (retry; 0).xxx {} dumps core — Tanaka Akira <akr@...17n.org>
ふと気がついたのですが、[ruby-dev:19293] に書いて誰にも反応されなかっ
4 messages
2004/03/26
[#23228] Zlib::GzipWriter.new(nil).close dumps core — Tanaka Akira <akr@...17n.org>
次のように、Zlib::GzipWriter.new(nil).close が core を吐きます。
8 messages
2004/03/26
[#23230] Re: Zlib::GzipWriter.new(nil).close dumps core
— nobu.nakada@...
2004/03/26
なかだです。
[#23231] Re: Zlib::GzipWriter.new(nil).close dumps core
— matz@... (Yukihiro Matsumoto)
2004/03/26
まつもと ゆきひろです
[#23238] Re: [ruby-cvs] ruby, ruby/lib, ruby/lib/rss, ruby/sample/openssl: * lib/logger.rb: trim tail space of each line. no user visible change. — Kouhei Sutou <kou@...>
須藤です.
10 messages
2004/03/27
[#23247] IO#readpartial — Tanaka Akira <akr@...17n.org>
ついに気が向いたので、以前から考えていた、stdio のバッファを考慮する
7 messages
2004/03/28
[#23274] Time.gm(...): gmtime/localtime error (ArgumentError) — MIYAMUKO Katsuyuki <k-miyamuko@...>
みやむこです。
6 messages
2004/03/30
[#23275] Re: Time.gm(...): gmtime/localtime error (ArgumentError)
— Tanaka Akira <akr@...17n.org>
2004/03/30
In article <4069466A.2030008@az.jp.nec.com>,
[#23283] ensure modifier — nobu.nakada@...
なかだです。
11 messages
2004/03/30
[ruby-dev:23150] multidigit hex char in leteral
From:
nobu.nakada@...
Date:
2004-03-06 02:05:38 UTC
List:
ruby-dev #23150
なかだです。
Onigurumaもimportされたことだし、リテラル中の\x{}を有効にしては
どうかと思うのですが。
$ ./ruby -v -e "p Regexp.new('\x{33}')"
ruby 1.9.0 (2004-03-06) [i686-linux]
/\x{33}/
$ ./ruby -v -e "p /\x{33}/"
ruby 1.9.0 (2004-03-06) [i686-linux]
-e:1: warning: ambiguous first argument; put parentheses or even spaces
-e:1: Invalid escape character syntax
p /\x{33}/
^
-e:1: unterminated string meets end of file
-e:1: parse error
p /\x{33}/
^
-e:1: warning: useless use of a literal in void context
* parse.y (read_escape, tokadd_escape, tokadd_string): allow multiple
hexadecimal escape.
Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.317
diff -u -2 -p -d -r1.317 parse.y
--- parse.y 3 Mar 2004 04:55:31 -0000 1.317
+++ parse.y 6 Mar 2004 02:00:37 -0000
@@ -2720,4 +2720,15 @@ newtok()
static void
+tokspace(n)
+ int n;
+{
+ tokidx += n;
+ if (tokidx >= toksiz) {
+ do {toksiz *= 2;} while (toksiz < tokidx);
+ REALLOC_N(tokenbuf, char, toksiz);
+ }
+}
+
+static void
tokadd(c)
char c;
@@ -2731,4 +2742,61 @@ tokadd(c)
static int
+tokadd_hex()
+{
+ int num, n, i, c;
+ char *s;
+
+ if (!peek('{')) {
+ c = scan_hex(lex_p, 2, &num);
+ if (num) tokadd(c);
+ return num;
+ }
+
+ s = lex_p;
+ do {
+ if (++s >= lex_pend) return 0;
+ } while (ISXDIGIT(*s));
+ if (*s != '}') return 0;
+ num = s - ++lex_p;
+ s = lex_p;
+ lex_p += num + 1; /* skip {...} */
+ if (!num) return 0;
+ i = tokidx;
+ tokspace((num + 1) >> 1);
+ n = num;
+ if (n & 1) {
+ tokenbuf[i++] = scan_hex(s++, 1, &c);
+ if (!--n) return num;
+ }
+ do {
+ tokenbuf[i++] = scan_hex(s, 2, &c);
+ } while (s += 2, (n -= 2) > 0);
+ return num;
+}
+
+static int
+tok_hex(numlen)
+ int *numlen;
+{
+ int c, n;
+ char *s, *p;
+
+ if (!peek('{')) return scan_hex(lex_p, 2, numlen);
+ s = lex_p + 1;
+ p = memchr(s, '}', lex_pend - s);
+ if (!p || (n = p - s) == 0) {
+ *numlen = 0;
+ return 0;
+ }
+ c = scan_hex(s, n, numlen);
+ if (*numlen != n) {
+ *numlen = 0;
+ return 0;
+ }
+ *numlen += 2;
+ return c;
+}
+
+static int
read_escape()
{
@@ -2775,5 +2843,5 @@ read_escape()
int numlen;
- c = scan_hex(lex_p, 2, &numlen);
+ c = tok_hex(&numlen);
if (numlen == 0) {
yyerror("Invalid escape character syntax");
@@ -2864,5 +2932,5 @@ tokadd_escape(term)
tokadd('\\');
tokadd(c);
- scan_hex(lex_p, 2, &numlen);
+ tok_hex(&numlen);
if (numlen == 0) {
yyerror("Invalid escape character syntax");
@@ -3034,4 +3102,8 @@ tokadd_string(func, term, paren, nest)
}
else if (func & STR_FUNC_EXPAND) {
+ if (c == 'x') {
+ if (!tokadd_hex()) return -1;
+ continue;
+ }
pushback(c);
if (func & STR_FUNC_ESCAPE) tokadd('\\');
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦