[#13765] GenerativeHash — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

17 messages 2001/07/08
[#13769] Re: GenerativeHash — matz@... (Yukihiro Matsumoto) 2001/07/09

まつもと ゆきひろです

[#13774] mkmf.rb: cleaning facility — Takaaki Tateishi <ttate@...>

立石です.

14 messages 2001/07/09

[#13800] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — nobu.nakada@...

なかだです。

20 messages 2001/07/10
[#13801] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — WATANABE Hirofumi <eban@...> 2001/07/10

わたなべです。

[#13802] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — matz@... (Yukihiro Matsumoto) 2001/07/10

まつもと ゆきひろです

[#13804] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — WATANABE Hirofumi <eban@...> 2001/07/10

わたなべです。

[#13805] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — matz@... (Yukihiro Matsumoto) 2001/07/10

まつもと ゆきひろです

[#13806] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — WATANABE Hirofumi <eban@...> 2001/07/10

わたなべです。

[#13807] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — matz@... (Yukihiro Matsumoto) 2001/07/10

まつもと ゆきひろです

[#13808] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — "Akinori MUSHA" <knu@...> 2001/07/10

At Tue, 10 Jul 2001 15:23:04 +0900,

[#13809] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — WATANABE Hirofumi <eban@...> 2001/07/10

わたなべです。

[#13810] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — "Akinori MUSHA" <knu@...> 2001/07/10

At Tue, 10 Jul 2001 16:50:52 +0900,

[#13811] Re: [ruby-cvs] ruby: * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). — "Akinori MUSHA" <knu@...> 2001/07/10

 もうひとつあった。

[#13828] supported platforms / K&R — "Akinori MUSHA" <knu@...>

 digest モジュールの各プラットフォームでの動作確認をお願いした

39 messages 2001/07/13
[#14389] Re: supported platforms / K&R — Koji Arai <JCA02266@...> 2001/08/08

新井です。

[#14399] Re: supported platforms / K&R — Takashi Shimizu <simtak@...> 2001/08/09

清水@biglobeです。

[#14404] Re: supported platforms / K&R — Koji Arai <JCA02266@...> 2001/08/09

新井です。

[#14461] Re: supported platforms / K&R — Takashi Shimizu <simtak@...> 2001/08/14

清水@biglobe です。

[#14466] Re: supported platforms / K&R — nobu.nakada@... 2001/08/14

なかだです。

[#14468] Re: supported platforms / K&R — Koji Arai <JCA02266@...> 2001/08/14

新井です。

[#14477] recursive malloc (Re: supported platforms / K&R) — Koji Arai <JCA02266@...> 2001/08/15

新井です。

[#14482] Re: recursive malloc (Re: supported platforms / K&R) — nobu.nakada@... 2001/08/15

なかだです。

[#14486] Re: recursive malloc (Re: supported platforms / K&R) — Koji Arai <JCA02266@...> 2001/08/15

新井です。

[#14490] Re: recursive malloc (Re: supported platforms/ K&R) — nobu.nakada@... 2001/08/15

なかだです。

[#14492] Re: recursive malloc (Re: supported platforms/ K&R) — Koji Arai <JCA02266@...> 2001/08/15

新井です。

[#14493] Re: recursive malloc (Re: supportedplatforms/ K&R) — nobu.nakada@... 2001/08/15

なかだです。

[#13878] Prototype for rb_gc_mark / volatile in ruby.h — Tietew <tietew@...>

Tietew です。

18 messages 2001/07/15
[#13880] Re: Prototype for rb_gc_mark / volatile in ruby.h — matz@... (Yukihiro Matsumoto) 2001/07/16

まつもと ゆきひろです

[#13940] IO#read — "Akinori MUSHA" <knu@...>

 IO#read を使って何度もストリームから読み込むような処理をする

20 messages 2001/07/19

[#13959] Re: [ruby-list:30682] Re: overwride method — "Akinori MUSHA" <knu@...>

At Fri, 20 Jul 2001 21:09:36 +0900,

95 messages 2001/07/20
[#13963] Re: [ruby-list:30682] Re: overwride method — GOTO Kentaro <gotoken@...> 2001/07/20

ごとけんです

[#13965] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/21

まつもと ゆきひろです

[#13967] Re: [ruby-list:30682] Re: overwride method — GOTO Kentaro <gotoken@...> 2001/07/21

ごとけんです

[#13969] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/21

まつもと ゆきひろです

[#13980] Re: [ruby-list:30682] Re: overwride method — GOTO Kentaro <gotoken@...> 2001/07/21

[ruby-dev:13969]>

[#13981] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/21

まつもと ゆきひろです

[#13984] Re: [ruby-list:30682] Re: overwride method — GOTO Kentaro <gotoken@...> 2001/07/22

ごとけんです

[#13993] Re: [ruby-list:30682] Re: overwride method — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/07/23

なひです。

[#13994] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/23

まつもと ゆきひろです

[#13995] Re: [ruby-list:30682] Re: overwride method — keiju@... (石塚圭樹) 2001/07/23

けいじゅ@日本ラショナルソフトウェアです.

[#13996] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/23

まつもと ゆきひろです

[#13997] Re: [ruby-list:30682] Re: overwride method — keiju@... (石塚圭樹) 2001/07/23

けいじゅ@日本ラショナルソフトウェアです.

[#13998] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/23

まつもと ゆきひろです

[#14000] Re: [ruby-list:30682] Re: overwride method — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/07/23

なひです。

[#14005] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/23

まつもと ゆきひろです

[#14016] Re: [ruby-list:30682] Re: overwride method — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/07/24

なひです。

[#14021] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14022] Re: [ruby-list:30682] Re: overwride method — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/07/24

なひです。

[#14023] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14037] Re: [ruby-list:30682] Re: overwride method — GOTO Kentaro <gotoken@...> 2001/07/24

ごとけんです

[#14039] Re: [ruby-list:30682] Re: overwride method — Masatoshi SEKI <m_seki@...> 2001/07/24

[#14040] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14043] Re: [ruby-list:30682] Re: overwride method — m_seki@... 2001/07/24

[#14053] Re: [ruby-list:30682] Re: overwride method — matz@... (Yukihiro Matsumoto) 2001/07/25

まつもと ゆきひろです

[#14082] private instance variable と _dump/_load — Masatoshi SEKI <m_seki@...> 2001/07/25

[#14084] Re: private instance variable と _dump/_load — keiju@... (石塚圭樹) 2001/07/25

けいじゅ@日本ラショナルソフトウェアです.

[#14087] Re: private instance variable と _dump/_load — matz@... (Yukihiro Matsumoto) 2001/07/25

まつもと ゆきひろです

[#14089] Re: private instance variable と _dump/_load — keiju@... (石塚圭樹) 2001/07/25

けいじゅ@日本ラショナルソフトウェアです.

[#14094] Re: private instance variable と _dump/_load — matz@... (Yukihiro Matsumoto) 2001/07/26

まつもと ゆきひろです

[#14133] Re: private instance variable と _dump/_load — "Shin'ya Adzumi" <adzumi@...> 2001/07/27

あづみです。

[#14134] Re: private instance variable と _dump/_load — matz@... (Yukihiro Matsumoto) 2001/07/27

まつもと ゆきひろです

[#14140] Re: private instance variable と _dump/_load — Kazuhiro NISHIYAMA <zn@...> 2001/07/27

In <996211878.306635.31396.nullmailer@ev.netlab.jp>

[#14143] Re: private instance variable と _dump/_load — matz@... (Yukihiro Matsumoto) 2001/07/27

まつもと ゆきひろです

[#14144] Re: private instance variable と _dump/_load — Kazuhiro NISHIYAMA <zn@...> 2001/07/27

In <996255758.830993.629.nullmailer@ev.netlab.jp>

[#14066] Re: [ruby-list:30682] Re: overwride method — "Shin'ya Adzumi" <adzumi@...> 2001/07/25

あづみです。

[#14068] private instance variable (Re: Re: overwride method) — matz@... (Yukihiro Matsumoto) 2001/07/25

まつもと ゆきひろです

[#14099] Is private instance variable really needed? — Shugo Maeda <shugo@...> 2001/07/26

前田です。

[#14104] Re: Is private instance variable really needed? — matz@... (Yukihiro Matsumoto) 2001/07/26

まつもと ゆきひろです

[#14026] Exception in coerce — Shin-ichiro HARA <sinara@...>

原です。

21 messages 2001/07/24
[#14027] Re: Exception in coerce — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14028] Re: Exception in coerce — Shin-ichiro HARA <sinara@...> 2001/07/24

原です。

[#14029] Re: Exception in coerce — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14030] Re: Exception in coerce — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14031] Re: Exception in coerce — Shin-ichiro HARA <sinara@...> 2001/07/24

原です。

[#14032] Re: Exception in coerce — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[ruby-dev:13717] Re: eval(code, true, filename)

From: Shugo Maeda <shugo@...>
Date: 2001-07-01 02:19:30 UTC
List: ruby-dev #13717
前田です。

At Fri, 29 Jun 2001 23:42:41 +0900,
matz@ruby-lang.org (Yukihiro Matsumoto) wrote:
> |eval(code, true, filename)
> |
> |で、ruby_wrapperを設定した状態でRubyスクリプトを評価できるように
> |してはどうでしょう。
> |# trueは:wrapなどのシンボルの方がよいかもしれません。
> 
> APIは考えた方が良いでしょうね。
> 
>   eval(aString[,aBinding[,file[,line]]])
> 
> なんで第2引数のtrueは適切ではないかも。

bindingとwrapの指定は排他的でいいかなと思ったのですが、いっそのこと
bindingにwrapperの情報を持たせる(本来そうであるべきかも)ようにして、
wrapper_binding(名前はもっといいのがあるかもしれませんが)でwrapper用
のbindingを返すようにするというのはどうでしょうか。

b = wrapper_binding
eval(str, b)

試しに実装してみたのでパッチを付けます。

前に石塚さんが空のbinding(?)がほしいといったことをおっしゃってた
ような気がしますが、wrapper_bindingが使えるかも。

-- 
前田 修吾

--- eval.c.orig	Sat Jun 30 22:23:37 2001
+++ eval.c	Sun Jul  1 10:51:15 2001
@@ -546,6 +546,7 @@
     int flags;
     struct RVarmap *dyna_vars;
     VALUE orig_thread;
+    VALUE wrapper;
     struct BLOCK *prev;
 };
 
@@ -4843,6 +4844,7 @@
     struct RVarmap * volatile old_dyna_vars;
     VALUE volatile old_cref;
     int volatile old_vmode;
+    volatile VALUE old_wrapper;
     struct FRAME frame;
     char *filesave = ruby_sourcefile;
     int linesave = ruby_sourceline;
@@ -4874,6 +4876,8 @@
 	scope_vmode = data->vmode;
 	old_cref = (VALUE)ruby_cref;
 	ruby_cref = (NODE*)ruby_frame->cbase;
+	old_wrapper = ruby_wrapper;
+	ruby_wrapper = data->wrapper;
 
 	self = data->self;
 	ruby_frame->iter = data->iter;
@@ -4909,6 +4913,7 @@
     if (!NIL_P(scope)) {
 	int dont_recycle = ruby_scope->flags & SCOPE_DONT_RECYCLE;
 
+	ruby_wrapper = old_wrapper;
 	ruby_cref  = (NODE*)old_cref;
 	ruby_frame = frame.tmp;
 	ruby_scope = old_scope;
@@ -6079,6 +6084,7 @@
 	rb_gc_mark((VALUE)data->dyna_vars);
 	rb_gc_mark((VALUE)data->klass);
 	rb_gc_mark((VALUE)data->tag);
+	rb_gc_mark(data->wrapper);
 	data = data->prev;
     }
 }
@@ -6194,6 +6200,7 @@
     *data = *ruby_block;
 
     data->orig_thread = rb_thread_current();
+    data->wrapper = ruby_wrapper;
     data->iter = rb_f_block_given_p();
     frame_dup(&data->frame);
     if (ruby_frame->prev) {
@@ -6222,6 +6229,39 @@
     return bind;
 }
 
+static VALUE
+rb_f_wrapper_binding(recv)
+    VALUE recv;
+{
+    VALUE bind, self;
+    VALUE wrapper = ruby_wrapper;
+
+    PUSH_VARS();
+    PUSH_CLASS();
+    ruby_class = ruby_wrapper = rb_module_new();
+    self = rb_obj_clone(ruby_top_self);
+    rb_extend_object(self, ruby_class);
+
+    PUSH_FRAME();
+    ruby_frame->last_func = 0;
+    ruby_frame->last_class = 0;
+    ruby_frame->self = self;
+    ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,ruby_class,0,0);
+    PUSH_SCOPE();
+    /* default visibility is private at loading toplevel */
+    SCOPE_SET(SCOPE_PRIVATE);
+
+    bind = rb_f_binding(self);
+
+    POP_SCOPE();
+    POP_FRAME();
+    POP_CLASS();
+    POP_VARS();
+    ruby_wrapper = wrapper;
+
+    return bind;
+}
+
 #define PROC_T3    FL_USER1
 #define PROC_T4    FL_USER2
 #define PROC_TMAX  (FL_USER1|FL_USER2)
@@ -6283,6 +6323,7 @@
     *data = *ruby_block;
 
     data->orig_thread = rb_thread_current();
+    data->wrapper = ruby_wrapper;
     data->iter = data->prev?Qtrue:Qfalse;
     frame_dup(&data->frame);
     if (data->iter) {
@@ -6352,6 +6393,7 @@
     int state;
     volatile int orphan;
     volatile int safe = ruby_safe_level;
+    volatile VALUE old_wrapper = ruby_wrapper;
 
     if (rb_block_given_p() && ruby_frame->last_func) {
 	rb_warning("block for %s#%s is useless",
@@ -6362,6 +6404,8 @@
     Data_Get_Struct(proc, struct BLOCK, data);
     orphan = blk_orphan(data);
 
+    ruby_wrapper = data->wrapper;
+
     /* PUSH BLOCK from data */
     old_block = ruby_block;
     _block = *data;
@@ -6387,6 +6431,7 @@
 	state &= TAG_MASK;
     }
     ruby_block = old_block;
+    ruby_wrapper = old_wrapper;
     ruby_safe_level = safe;
 
     switch (state) {
@@ -6496,6 +6541,7 @@
     int state;
     volatile int orphan;
     volatile int safe = ruby_safe_level;
+    volatile VALUE old_wrapper = ruby_wrapper;
 
     if (NIL_P(block)) {
 	return rb_eval(self, node->nd_iter);
@@ -6511,6 +6557,8 @@
     Data_Get_Struct(block, struct BLOCK, data);
     orphan = blk_orphan(data);
 
+    ruby_wrapper = data->wrapper;
+
     /* PUSH BLOCK from data */
     old_block = ruby_block;
     _block = *data;
@@ -6548,6 +6596,7 @@
 	}
     }
     ruby_block = old_block;
+    ruby_wrapper = old_wrapper;
     ruby_safe_level = safe;
 
     switch (state) {/* escape from orphan procedure */
@@ -6927,6 +6976,7 @@
     rb_define_global_function("proc", rb_f_lambda, 0);
     rb_define_global_function("lambda", rb_f_lambda, 0);
     rb_define_global_function("binding", rb_f_binding, 0);
+    rb_define_global_function("wrapper_binding", rb_f_wrapper_binding, 0);
     rb_cBinding = rb_define_class("Binding", rb_cObject);
     rb_undef_method(CLASS_OF(rb_cBinding), "new");
     rb_define_method(rb_cBinding, "clone", bind_clone, 0);

In This Thread