[#24210] [SEGV] redefine Struct with same name — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。Struct を同じ名前で二度定義すると、
6 messages
2004/09/03
[#24213] 1.instance_eval "@@a" dumps core — Tanaka Akira <akr@...17n.org>
次のように、1.instance_eval "@@a" とすると core を吐きます。
10 messages
2004/09/03
[#24217] Re: 1.instance_eval "@@a" dumps core
— Yukihiro Matsumoto <matz@...>
2004/09/03
まつもと ゆきひろです
[#24218] Re: 1.instance_eval "@@a" dumps core
— Tanaka Akira <akr@...17n.org>
2004/09/04
In article <1094229200.559688.22218.nullmailer@picachu.netlab.jp>,
[#24219] Re: 1.instance_eval "@@a" dumps core
— Yukihiro Matsumoto <matz@...>
2004/09/05
まつもと ゆきひろです
[#24220] Re: 1.instance_eval "@@a" dumps core
— Tanaka Akira <akr@...17n.org>
2004/09/05
In article <1094342919.363209.2395.nullmailer@picachu.netlab.jp>,
[#24221] Re: 1.instance_eval "@@a" dumps core
— Yukihiro Matsumoto <matz@...>
2004/09/05
まつもと ゆきひろです
[#24231] system("") — Tanaka Akira <akr@...17n.org>
次のように、system("") が例外になるのは意図された挙動でしょうか?
6 messages
2004/09/06
[#24234] 要素代入での?!の扱いについて — Nowake <nowake@...>
野分です。
6 messages
2004/09/06
[#24255] ripper committed — Minero Aoki <aamine@...>
青木です。
11 messages
2004/09/12
[#24261] Array#collect! dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
7 messages
2004/09/14
[#24277] new NKF2拡張ライブラリ — "Kenichi.Tamura" <sgs02516@...>
たむらです。
5 messages
2004/09/16
[#24287] Array#sort! with calcc dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
6 messages
2004/09/19
[#24288] Re: Array#sort! with calcc dumps core
— Yukihiro Matsumoto <matz@...>
2004/09/19
まつもと ゆきひろです
[#24302] Procのブロック呼び出しメソッド名を自由に設定 — Nowake <nowake@...>
こんばんは、野分です。
8 messages
2004/09/21
[#24304] Re: Procのブロック呼び出しメソッド名を自由に設定
— Yukihiro Matsumoto <matz@...>
2004/09/22
まつもと ゆきひろです
[#24311] Array#sort! dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
5 messages
2004/09/22
[#24315] String#sub! dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
5 messages
2004/09/23
[#24332] Marshal.dump dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
4 messages
2004/09/24
[#24337] Re: [ruby-cvs] ruby: * hash.c: iterator functions for hash_foreach() should return enum — nobu@...
なかだです。
4 messages
2004/09/24
[#24341] Array#* dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
9 messages
2004/09/25
[#24351] Re: Array#* dumps core
— nobu@...
2004/09/27
なかだです。
[#24354] finalizer
— Tanaka Akira <akr@...17n.org>
2004/09/27
In article <200409270225.i8R2PDfs014206@sharui.nakada.niregi.kanuma.tochigi.jp>,
[#24368] Enumerable#sort_by dumps core — Tanaka Akira <akr@...17n.org>
次のようにすると core を吐きます。
4 messages
2004/09/28
[ruby-dev:24272] Re: ripper committed
From:
nobu@...
Date:
2004-09-15 06:18:12 UTC
List:
ruby-dev #24272
なかだです。
At Mon, 13 Sep 2004 05:20:16 +0900,
Minero Aoki wrote in [ruby-dev:24255]:
> さきほど Ripper の本体を CVS HEAD にコミットしました。
* static-linked-extでリンクできない
rb_reserved_word()が二重定義になるため。
* here documentの前の空白が捨てられる
* 複数行にわたる文字列後のRipper#linenoがRipper外部の行番号になっ
てしまう。
parse.y:rb_node_newnode()を共有しているため、lex_strtermには
struct ripper_paramsではない生のruby_sourcefile/lineが保存さ
れる。
これはrb_node_newnode()自体を再定義したほうがいいかも。
Index: keywords
===================================================================
RCS file: /cvs/ruby/src/ruby/keywords,v
retrieving revision 1.7
diff -U2 -p -d -r1.7 keywords
--- keywords 12 Sep 2004 15:21:49 -0000 1.7
+++ keywords 13 Sep 2004 01:47:25 -0000
@@ -1,3 +1,6 @@
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
+struct kwtable *rb_reserved_word _((const char *, unsigned int));
+#ifndef RIPPER
+
%%
__LINE__, {k__LINE__, k__LINE__}, EXPR_END
@@ -41,2 +44,4 @@ when, {kWHEN, kWHEN}, EXPR_BEG
while, {kWHILE, kWHILE_MOD}, EXPR_BEG
yield, {kYIELD, kYIELD}, EXPR_ARG
+%%
+#endif
Index: lex.c
===================================================================
RCS file: /cvs/ruby/src/ruby/lex.c,v
retrieving revision 1.11
diff -U2 -p -d -r1.11 lex.c
--- lex.c 12 Sep 2004 15:21:49 -0000 1.11
+++ lex.c 13 Sep 2004 01:47:35 -0000
@@ -2,4 +2,7 @@
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
+struct kwtable *rb_reserved_word _((const char *, unsigned int));
+#ifndef RIPPER
+;
#define TOTAL_KEYWORDS 40
@@ -135,2 +138,3 @@ rb_reserved_word (str, len)
return 0;
}
+#endif
Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.334
diff -U2 -p -d -r1.334 parse.y
--- parse.y 14 Sep 2004 13:11:29 -0000 1.334
+++ parse.y 15 Sep 2004 06:04:52 -0000
@@ -5024,6 +5024,20 @@ ripper_tokadd_string(parser, func, term,
}
-#define NEW_STRTERM(func, term, paren) \
+#define NEW_STRTERM0(func, term, paren) \
rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
+#ifndef RIPPER
+#define NEW_STRTERM(func, term, paren) NEW_STRTERM0(func, term, paren)
+#else
+#define NEW_STRTERM(func, term, paren) ripper_new_strterm(parser, func, term, paren)
+static NODE *
+ripper_new_strterm(parser, func, term, paren)
+ struct ripper_params *parser;
+ VALUE func, term, paren;
+{
+ NODE *node = NEW_STRTERM0(func, term, paren);
+ nd_set_line(node, ruby_sourceline);
+ return node;
+}
+#endif
static int
@@ -5141,4 +5155,5 @@ ripper_heredoc_identifier(parser)
tokfix();
#ifdef RIPPER
+ ripper_dispatch_space(parser);
ripper_dispatch_nonspace(parser, tHEREDOC_BEG);
#endif
@@ -5150,4 +5165,5 @@ ripper_heredoc_identifier(parser)
lex_lastline); /* nd_orig */
#ifdef RIPPER
+ nd_set_line(lex_strterm, ruby_sourceline);
ripper_clear_token(parser);
#endif
Index: ext/ripper/ripper.rb.in
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/ripper/ripper.rb.in,v
retrieving revision 1.1
diff -U2 -p -d -r1.1 ripper.rb.in
--- ext/ripper/ripper.rb.in 12 Sep 2004 17:34:29 -0000 1.1
+++ ext/ripper/ripper.rb.in 14 Sep 2004 03:32:19 -0000
@@ -1,3 +1,3 @@
-#
+# -*- ruby -*-
# This file is automatically generated from ripper.rb.in and parse.y.
# DO NOT MODIFY!!!!!!
@@ -14,5 +14,5 @@ require 'ripper.so'
class Ripper
def Ripper.parse(str, *args)
- new.parse(str, *args)
+ new(str, *args).parse
end
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦