[#31320] Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

124 messages 2007/08/01
[#31321] Re: Import RubyGems to Ruby 1.9 — Nobuyoshi Nakada <nobu@...> 2007/08/01

なかだです。

[#31329] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/08/01

-----BEGIN PGP SIGNED MESSAGE-----

[#31918] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/30

-----BEGIN PGP SIGNED MESSAGE-----

[#31970] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/08

-----BEGIN PGP SIGNED MESSAGE-----

[#32023] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/11

まつもと ゆきひろです

[#32062] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32066] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32068] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32069] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32070] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32073] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32079] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/16

-----BEGIN PGP SIGNED MESSAGE-----

[#32080] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/16

まつもと ゆきひろです

[#32132] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/23

-----BEGIN PGP SIGNED MESSAGE-----

[#32081] Re: Import RubyGems to Ruby 1.9 — Takahiro Kambe <taca@...> 2007/10/16

In message <471447D5.5050902@sarion.co.jp>

[#32087] Re: Import RubyGems to Ruby 1.9 — "Akinori MUSHA" <knu@...> 2007/10/17

 Rubygems は、基本的に他のパッケージシステムから包みやすい作り

[#32104] Re: Import RubyGems to Ruby 1.9 — akira yamada <akira@...> 2007/10/20

Tuesday 16 October 2007 14:09:13 に NAKAMURA, Hiroshi さんは書きました:

[#32109] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/20

-----BEGIN PGP SIGNED MESSAGE-----

[#31332] Re: Import RubyGems to Ruby 1.9 — Tadayoshi Funaba <tadf@...> 2007/08/01

> ちなみに「ruby/1.9.1の標準添付からどのライブラリを外すか?」という議論も

[#31858] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/25

-----BEGIN PGP SIGNED MESSAGE-----

[#31872] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/27

-----BEGIN PGP SIGNED MESSAGE-----

[#31905] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/29

-----BEGIN PGP SIGNED MESSAGE-----

[#31906] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/09/29

まつもと ゆきひろです

[#31910] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/30

-----BEGIN PGP SIGNED MESSAGE-----

[#31920] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/09/30

まつもと ゆきひろです

[#31323] Bignum#to_s の Karatsuba 基数変換による高速化 — "Kenta Murata" <muraken@...>

むらけんです.

16 messages 2007/08/01
[#31326] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — Yukihiro Matsumoto <matz@...> 2007/08/01

まつもと ゆきひろです

[#31327] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — "Kenta Murata" <muraken@...> 2007/08/01

むらけんです.

[#31328] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — Yukihiro Matsumoto <matz@...> 2007/08/01

まつもと ゆきひろです

[#31525] いくつかのバグ報告と提案(5点) — eklerni <eklerni@...>

From:eklerni

13 messages 2007/08/20

[#31539] strtod の精度 — Satoshi Nakagawa <snakagawa@...>

中川といいます。

27 messages 2007/08/20
[#31542] Re: strtod の精度 — Yukihiro Matsumoto <matz@...> 2007/08/20

まつもと ゆきひろです

[ruby-dev:31589] Re: いくつかのバグ報告と提案(5点)

From: Nobuyoshi Nakada <nobu@...>
Date: 2007-08-22 04:01:24 UTC
List: ruby-dev #31589
なかだです。

At Tue, 21 Aug 2007 00:11:53 +0900,
Yukihiro Matsumoto wrote in [ruby-dev:31546]:
> あと、-r debug -e '1..2' の件はrb_sourcefile()が0を返すのが
> 原因であるところまでは分かったのですが、そこから先は、ささだ
> くんがなかださんでないとわからないと思いました。

rb_sourcefile()が返すのは、実行中のrubyスクリプトの名前だけです。
原因は二つあって、本来独立しているのですが、この問題は両方が揃っ
たときに発生します。

(A) メインスクリプトのパース中はまだ実行しているスクリプトがない
    ので、ファイル名が得られない(-rオプションについては対処済)

(B) パース中もトレースが呼ばれてしまう

Aについては-r同様rb_vm_call_cfunc()を使うか、初期化のときにruby
level frameを作っておくことで解決すると思います。それとは別に、
Bもいろいろと問題を起こしそうなので、禁止するほうがいいと思いま
す。


Index: parse.y
===================================================================
--- parse.y	(revision 13187)
+++ parse.y	(working copy)
@@ -4602,13 +4602,13 @@ static void parser_prepare(struct parser
 
 #ifndef RIPPER
-VALUE ruby_suppress_tracing(VALUE (*func)(ANYARGS), VALUE arg);
+VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always);
 
 static VALUE
-debug_lines(VALUE f)
+debug_lines(const char *f)
 {
     if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
 	VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__"));
 	if (TYPE(hash) == T_HASH) {
-	    VALUE fname = rb_str_new2((const char *)f);
+	    VALUE fname = rb_str_new2(f);
 	    VALUE lines = rb_hash_lookup(hash, fname);
 	    if (NIL_P(lines)) {
@@ -4622,16 +4622,17 @@ debug_lines(VALUE f)
 }
 
-static NODE*
-yycompile(struct parser_params *parser, const char *f, int line)
+static VALUE
+yycompile0(VALUE arg, int tracing)
 {
     int n;
     const char *kcode_save;
     NODE *tree;
+    struct parser_params *parser = (struct parser_params *)arg;
 
     if (!compile_for_eval && rb_safe_level() == 0) {
-	ruby_debug_lines = ruby_suppress_tracing(debug_lines, (VALUE)f);
-	if (ruby_debug_lines && line > 1) {
+	ruby_debug_lines = debug_lines(ruby_sourcefile);
+	if (ruby_debug_lines && ruby_sourceline > 0) {
 	    VALUE str = rb_str_new(0,0);
-	    n = line - 1;
+	    n = ruby_sourceline;
 	    do {
 		rb_ary_push(ruby_debug_lines, str);
@@ -4641,6 +4642,4 @@ yycompile(struct parser_params *parser, 
 
     kcode_save = rb_get_kcode();
-    ruby_sourcefile = rb_source_filename(f);
-    ruby_sourceline = line - 1;
     parser_prepare(parser);
     n = yyparse((void*)parser);
@@ -4660,5 +4659,13 @@ yycompile(struct parser_params *parser, 
 	tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
     }
-    return tree;
+    return (VALUE)tree;
+}
+
+static NODE*
+yycompile(struct parser_params *parser, const char *f, int line)
+{
+    ruby_sourcefile = rb_source_filename(f);
+    ruby_sourceline = line - 1;
+    return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue);
 }
 #endif /* !RIPPER */
Index: thread.c
===================================================================
--- thread.c	(revision 13187)
+++ thread.c	(working copy)
@@ -2818,5 +2818,5 @@ get_event_name(rb_event_flag_t event)
 }
 
-VALUE ruby_suppress_tracing(VALUE (*func)(ANYARGS), VALUE arg);
+VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always);
 
 struct call_trace_func_args {
@@ -2829,5 +2829,5 @@ struct call_trace_func_args {
 
 static VALUE
-call_trace_proc(VALUE args)
+call_trace_proc(VALUE args, int tracing)
 {
     struct call_trace_func_args *p = (struct call_trace_func_args *)args;
@@ -2853,15 +2853,15 @@ call_trace_func(rb_event_flag_t event, V
     args.id = id;
     args.klass = klass;
-    ruby_suppress_tracing(call_trace_proc, (VALUE)&args);
+    ruby_suppress_tracing(call_trace_proc, (VALUE)&args, Qfalse);
 }
 
 VALUE
-ruby_suppress_tracing(VALUE (*func)(ANYARGS), VALUE arg)
+ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always)
 {
     rb_thread_t *th = GET_THREAD();
-    int state, raised;
+    int state, raised, tracing;
     VALUE result = Qnil;
 
-    if (th->tracing) {
+    if ((tracing = th->tracing) != 0 && !always) {
 	return Qnil;
     }
@@ -2874,5 +2874,5 @@ ruby_suppress_tracing(VALUE (*func)(ANYA
     PUSH_TAG();
     if ((state = EXEC_TAG()) == 0) {
-	result = (*func)(arg);
+	result = (*func)(arg, tracing);
     }
 
@@ -2882,5 +2882,5 @@ ruby_suppress_tracing(VALUE (*func)(ANYA
     POP_TAG();
 
-    th->tracing = 0;
+    th->tracing = tracing;
     if (state) {
 	JUMP_TAG(state);


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread