[#34911] erb still treats $KCODE — "Yusuke ENDOH" <mame@...>

遠藤です。

16 messages 2008/06/03

[#34923] open() and encodings — "NARUSE, Yui" <naruse@...>

成瀬です。

53 messages 2008/06/03
[#34924] Re: open() and encodings — Yukihiro Matsumoto <matz@...> 2008/06/04

まつもと ゆきひろです

[#34931] Re: open() and encodings — "NARUSE, Yui" <naruse@...> 2008/06/04

成瀬です。

[#34934] Re: open() and encodings — Yukihiro Matsumoto <matz@...> 2008/06/05

まつもと ゆきひろです

[#34935] Re: open() and encodings — "U.Nakamura" <usa@...> 2008/06/05

こんにちは、なかむら(う)です。

[#34936] Re: open() and encodings — Yukihiro Matsumoto <matz@...> 2008/06/05

まつもと ゆきひろです

[#34937] Re: open() and encodings — "U.Nakamura" <usa@...> 2008/06/05

こんにちは、なかむら(う)です。

[#34948] Re: open() and encodings — Hidetoshi NAGAI <nagai@...> 2008/06/05

永井@知能.九工大です.

[#34961] Re: open() and encodings — "NARUSE, Yui" <naruse@...> 2008/06/05

成瀬です。

[#34997] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — SASADA Koichi <ko1@...>

 ささだです.

19 messages 2008/06/08
[#34998] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — Yukihiro Matsumoto <matz@...> 2008/06/08

まつもと ゆきひろです

[#34999] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — SASADA Koichi <ko1@...> 2008/06/08

 ささだです.

[#35000] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — Yukihiro Matsumoto <matz@...> 2008/06/08

まつもと ゆきひろです

[#35001] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — SASADA Koichi <ko1@...> 2008/06/08

 ささだです.

[#35003] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — Yukihiro Matsumoto <matz@...> 2008/06/08

まつもと ゆきひろです

[#35007] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — "Yusuke ENDOH" <mame@...> 2008/06/09

遠藤です。

[#35013] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — Yukihiro Matsumoto <matz@...> 2008/06/09

まつもと ゆきひろです

[#35019] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — "Yusuke ENDOH" <mame@...> 2008/06/09

遠藤です。

[#35021] Re: [ruby-changes:5517] Ruby:r17021 (trunk): * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with — Yukihiro Matsumoto <matz@...> 2008/06/09

まつもと ゆきひろです

[#35020] Ruby 1.8.7-p17 has been released — "Akinori MUSHA" <knu@...>

 Ruby 1.8.7-p17 をリリースしました。

13 messages 2008/06/09

[#35044] deadlock detection for 1.9 — "Yusuke ENDOH" <mame@...>

遠藤です。

14 messages 2008/06/10

[#35108] Re: [ruby-list:44988] Re: 各ブランチの計画 — Urabe Shyouhei <shyouhei@...>

卜部です。

15 messages 2008/06/15

[#35200] Win32 Unicode console output — Tietew <tietew@...>

Tietew です。

22 messages 2008/06/22
[#35270] Re: Win32 Unicode console output — "NARUSE, Yui" <naruse@...> 2008/06/29

[#35226] [PATCH] freeze required_paths in gem_prelude.rb — "Keita Yamaguchi" <keita.yamaguchi@...>

山口と申します。

14 messages 2008/06/25
[#35228] Re: [PATCH] freeze required_paths in gem_prelude.rb — "Yusuke ENDOH" <mame@...> 2008/06/25

遠藤です。

[#35230] Re: [PATCH] freeze required_paths in gem_prelude.rb — Yukihiro Matsumoto <matz@...> 2008/06/25

まつもと ゆきひろです

[#35227] [Bug:trunk] Re: [ruby-cvs:24798] Ruby:r17573 (trunk): * parse.y (primary): make functional-style not operator to act — "U.Nakamura" <usa@...>

こんにちは、なかむら(う)です。

7 messages 2008/06/25

[#35247] Re: [ruby-list:45128] Re: Ruby 1.9.0/1.8.7/1.8.6/1.8.5 new releases (Security Fix) — Urabe Shyouhei <shyouhei@...>

卜部です。-devに振ります。ひょっとしてこんなパッチでSEGVのほうはおさまっ

13 messages 2008/06/26
[#35250] Re: [ruby-list:45128] Re: Ruby 1.9.0/1.8.7/1.8.6/1.8.5 new releases (Security Fix) — Yukihiro Matsumoto <matz@...> 2008/06/26

まつもと ゆきひろです

[#35273] $SAFEの今後 — Urabe Shyouhei <shyouhei@...>

〜これまでのあらすじ〜

24 messages 2008/06/30
[#35293] Re: $SAFEの今後 — Yukihiro Matsumoto <matz@...> 2008/07/01

まつもと ゆきひろです

[#35298] Re: $SAFEの今後 — Urabe Shyouhei <shyouhei@...> 2008/07/01

卜部です。

[#35303] Re: $SAFEの今後 — Yukihiro Matsumoto <matz@...> 2008/07/01

まつもと ゆきひろです

[#35304] Re: $SAFEの今後 — Urabe Shyouhei <shyouhei@...> 2008/07/01

卜部です。

[#35305] Re: $SAFEの今後 — Yukihiro Matsumoto <matz@...> 2008/07/01

まつもと ゆきひろです

[#35306] Re: $SAFEの今後 — "Shugo Maeda" <shugo@...> 2008/07/02

前田です。

[#35278] [BUG] test_win32ole_event.rb in trunk — Masaki Suketa <masaki.suketa@...>

助田です。

22 messages 2008/06/30
[#35281] Re: [BUG] test_win32ole_event.rb in trunk — "U.Nakamura" <usa@...> 2008/06/30

こんにちは、なかむら(う)です。

[#35282] Re: [BUG] test_win32ole_event.rb in trunk — arton <artonx@...> 2008/06/30

artonです。

[#35295] Re: [BUG] test_win32ole_event.rb in trunk — Masaki Suketa <masaki.suketa@...> 2008/07/01

助田です。

[ruby-dev:35220] ISeq#to_a hides internal_id

From: "Yusuke ENDOH" <mame@...>
Date: 2008-06-24 16:39:14 UTC
List: ruby-dev #35220
遠藤です。

NODE_FOR の internal_id が VM::InstructionSequence#to_a で出力
されないため、to_a して load して eval すると変なことになります。

$ ./ruby -e '
VM::InstructionSequence.load(
  VM::InstructionSequence.compile(
    "for i in [1, 2, 3]; p i; end"
  ).to_a
).eval
'
-605544602
-605544602
-605544602

あんまり自信ないですが、パッチをつけます。
internal_id はバイトコード上で nil で表すようにしてみました。

ついでに、VM::InstructionSequence.load をコメントアウトではなく
マクロで無効化するのはどうでしょうか。CFLAGS だけで有効にできる
ので楽です。テストをしてくれる (地雷を踏んでくれる) 人が増える
かもしれません。


Index: iseq.c
===================================================================
--- iseq.c	(revision 17564)
+++ iseq.c	(working copy)
@@ -1034,11 +1034,11 @@
     /* locals */
     for (i=0; i<iseq->local_table_size; i++) {
 	ID lid = iseq->local_table[i];
-	if (lid) {
-	    if (rb_id2str(lid)) rb_ary_push(locals, ID2SYM(lid));
+	if (lid && rb_id2str(lid)) {
+	    rb_ary_push(locals, ID2SYM(lid));
 	}
 	else {
-	    rb_ary_push(locals, ID2SYM(rb_intern("#arg_rest")));
+	    rb_ary_push(locals, Qnil);
 	}
     }

@@ -1299,8 +1299,11 @@
     rb_define_method(rb_cISeq, "eval", iseq_eval, 0);

     /* disable this feature because there is no verifier. */
-    /* rb_define_singleton_method(rb_cISeq, "load", iseq_s_load, -1); */
+#ifdef ANGEROUS_ISEQ_LOAD
+    rb_define_singleton_method(rb_cISeq, "load", iseq_s_load, -1);
+#else
     (void)iseq_s_load;
+#endif

     rb_define_singleton_method(rb_cISeq, "compile", iseq_s_compile, -1);
     rb_define_singleton_method(rb_cISeq, "new", iseq_s_compile, -1);
Index: compile.c
===================================================================
--- compile.c	(revision 17564)
+++ compile.c	(working copy)
@@ -4996,7 +4996,7 @@

     for (i=0; i<RARRAY_LEN(locals); i++) {
 	VALUE lv = RARRAY_PTR(locals)[i];
-	tbl[i] = FIXNUM_P(lv) ? FIX2INT(lv) : SYM2ID(CHECK_SYMBOL(lv));
+	tbl[i] = NIL_P(lv) ? 0 : SYM2ID(CHECK_SYMBOL(lv));
     }

     /* args */

-- 
Yusuke ENDOH <mame@tsg.ne.jp>

In This Thread

Prev Next