[#16116] RCRchive shutting down — "David A. Black" <dblack@...>

Hi everyone --

22 messages 2008/04/03
[#16119] Re: [ANN] RCRchive shutting down — "Robert Dober" <robert.dober@...> 2008/04/03

This is quite sad news, I feel that a mailing list does not offer all

[#16121] Re: [ANN] RCRchive shutting down — Yukihiro Matsumoto <matz@...> 2008/04/03

Hi,

[#16122] Re: [ANN] RCRchive shutting down — "Robert Dober" <robert.dober@...> 2008/04/03

On Thu, Apr 3, 2008 at 12:01 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#16123] issue tracking (Re: [ANN] RCRchive shutting down) — Yukihiro Matsumoto <matz@...> 2008/04/03

Hi,

[#16124] Re: issue tracking (Re: [ANN] RCRchive shutting down) — "Meinrad Recheis" <meinrad.recheis@...> 2008/04/03

On Thu, Apr 3, 2008 at 1:13 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#16128] RUBY_IMPLEMENTATION — Yukihiro Matsumoto <matz@...>

Hi,

60 messages 2008/04/03
[#16139] Re: RUBY_IMPLEMENTATION — Paul Brannan <pbrannan@...> 2008/04/03

On Thu, Apr 03, 2008 at 11:41:41PM +0900, Yukihiro Matsumoto wrote:

[#16143] Re: RUBY_IMPLEMENTATION — Eric Hodel <drbrain@...7.net> 2008/04/03

On Apr 3, 2008, at 10:59 AM, Paul Brannan wrote:

[#16146] Re: RUBY_IMPLEMENTATION — Yukihiro Matsumoto <matz@...> 2008/04/03

Hi,

[#16147] Re: RUBY_IMPLEMENTATION — Ezra Zygmuntowicz <ezmobius@...> 2008/04/03

[#16149] Re: RUBY_IMPLEMENTATION — Charles Oliver Nutter <charles.nutter@...> 2008/04/03

Ezra Zygmuntowicz wrote:

[#16155] Re: RUBY_IMPLEMENTATION — "Yemi I. D. Bedu" <yemi@...> 2008/04/03

Hello,

[#16158] Re: RUBY_IMPLEMENTATION — Charles Oliver Nutter <charles.nutter@...> 2008/04/03

Yemi I. D. Bedu wrote:

[#16175] Re: RUBY_IMPLEMENTATION — Eleanor McHugh <eleanor@...> 2008/04/04

On 4 Apr 2008, at 00:23, Charles Oliver Nutter wrote:

[#16194] Re: RUBY_IMPLEMENTATION — Chris Cummer <chris@...> 2008/04/04

On 4-Apr-08, at 3:05 AM, Eleanor McHugh wrote:

[#16195] Re: RUBY_IMPLEMENTATION — "Luis Lavena" <luislavena@...> 2008/04/04

On Fri, Apr 4, 2008 at 2:15 PM, Chris Cummer <chris@postal-code.com> wrote:

[#16240] syntax request — "ry dahl" <ry@...>

Often times when one has many long arguments and orders them like this

42 messages 2008/04/06
[#16263] Re: syntax request — "Bill Kelly" <billk@...> 2008/04/07

[#16266] Re: syntax request — "David A. Black" <dblack@...> 2008/04/08

On Tue, 8 Apr 2008, Bill Kelly wrote:

[#16282] Re: syntax request — Paul Brannan <pbrannan@...> 2008/04/08

On Tue, Apr 08, 2008 at 02:23:26PM +0900, David A. Black wrote:

[#16290] Could someone confirm signal handling is broken on OSX? — Dave Thomas <dave@...>

I've raised this before, but no one replied. I'd like to double check

12 messages 2008/04/08

[#16359] design meeting — Yukihiro Matsumoto <matz@...>

Hi,

18 messages 2008/04/12

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

Folks,

16 messages 2008/04/15

[#16482] Performance on method dispatch for methods defined via define_method — "Robert Dober" <robert.dober@...>

Hi

32 messages 2008/04/22
[#16483] Re: Performance on method dispatch for methods defined via define_method — Paul Brannan <pbrannan@...> 2008/04/22

On Wed, Apr 23, 2008 at 12:39:29AM +0900, Robert Dober wrote:

[#16484] Re: Performance on method dispatch for methods defined via define_method — "Robert Dober" <robert.dober@...> 2008/04/22

On Tue, Apr 22, 2008 at 8:46 PM, Paul Brannan <pbrannan@atdesk.com> wrote:

[#16487] Re: Performance on method dispatch for methods defined via define_method — "David A. Black" <dblack@...> 2008/04/22

Hi --

[#16488] Re: Performance on method dispatch for methods defined via define_method — "Robert Dober" <robert.dober@...> 2008/04/22

On Tue, Apr 22, 2008 at 10:44 PM, David A. Black <dblack@rubypal.com> wrote:

[#16490] Re: Performance on method dispatch for methods defined via define_method — "David A. Black" <dblack@...> 2008/04/22

Hi --

[#16501] Re: Performance on method dispatch for methods defined via define_method — ts <decoux@...> 2008/04/23

Robert Dober wrote:

[#16507] Drop :: as a . synonym — "David A. Black" <dblack@...>

Hi --

50 messages 2008/04/23
[#16511] Re: [RCR] Drop :: as a . synonym — Charles Oliver Nutter <charles.nutter@...> 2008/04/23

David A. Black wrote:

[#16512] Re: [RCR] Drop :: as a . synonym — "David A. Black" <dblack@...> 2008/04/23

Hi --

[#16525] Re: [RCR] Drop :: as a . synonym — Charles Oliver Nutter <charles.nutter@...> 2008/04/23

David A. Black wrote:

[#16527] Re: [RCR] Drop :: as a . synonym — "David A. Black" <dblack@...> 2008/04/23

Hi --

[#16534] Re: [RCR] Drop :: as a . synonym — Thomas Enebo <Thomas.Enebo@...> 2008/04/23

David A. Black wrote:

[#16546] Re: [RCR] Drop :: as a . synonym — "David A. Black" <dblack@...> 2008/04/24

Hi --

[#16552] Re: [RCR] Drop :: as a . synonym — "Jeremy McAnally" <jeremymcanally@...> 2008/04/24

Or changing #send to private...or (insert progressive but code

[#16564] Re: [RCR] Drop :: as a . synonym — Charles Oliver Nutter <charles.nutter@...> 2008/04/24

Jeremy McAnally wrote:

[#16567] Re: [RCR] Drop :: as a . synonym — "David A. Black" <dblack@...> 2008/04/24

Hi --

[#16570] Re: [RCR] Drop :: as a . synonym — Yukihiro Matsumoto <matz@...> 2008/04/24

Hi,

[#16531] Re: [RCR] Drop :: as a . synonym — "Eric Mahurin" <eric.mahurin@...> 2008/04/23

On Wed, Apr 23, 2008 at 9:21 AM, David A. Black <dblack@rubypal.com> wrote:

Re: Sigsegv when running Kernel rubysecs with ruby_1_8 branch

From: ts <decoux@...>
Date: 2008-04-06 11:08:13 UTC
List: ruby-core #16238
Vladimir Sizikov wrote:
> I've written a small quick starting guide here:
> http://blog.emptyway.com/2008/04/06/the-rubyspecs-quick-starting-guide/

 Thanks,

vgs% bin/mspec -t ruby spec/ruby/1.8/core/kernel
ruby 1.8.6 (2008-04-06 patchlevel 5000) [i686-linux]
.......................................................................................................................................................................................................................................................................................................................

Finished in 0.190939 seconds

101 files, 311 examples, 2658 expectations, 0 failures, 0 errors
vgs%


 Please verify it

Guy Decoux




Index: intern.h
===================================================================
--- intern.h	(revision 15910)
+++ intern.h	(working copy)
@@ -184,6 +184,8 @@
 void rb_obj_call_init _((VALUE, int, VALUE*));
 VALUE rb_class_new_instance _((int, VALUE*, VALUE));
 VALUE rb_block_proc _((void));
+VALUE rb_block_dup _((VALUE, VALUE, VALUE));
+VALUE rb_method_dup _((VALUE, VALUE, VALUE));
 VALUE rb_f_lambda _((void));
 VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE
procarg] */), VALUE));
 VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
Index: class.c
===================================================================
--- class.c	(revision 15910)
+++ class.c	(working copy)
@@ -51,6 +51,7 @@
 struct clone_method_data {
     st_table *tbl;
     VALUE klass;
+    VALUE cref;
 };

 static int
@@ -59,18 +60,75 @@
     NODE *body;
     struct clone_method_data *data;
 {
-    NODE *fbody = body->nd_body;
+    NODE *node = body->nd_body;
+    if (node && data->cref) {
+	switch(nd_type(node)) {
+	case NODE_SCOPE:
+	    if (node->nd_rval) {
+		NODE *tmp = NEW_NODE(nd_type(node->u2.node), data->cref,
+				     node->u2.node->u2.node, node->u2.node->u3.node);
+		node = NEW_NODE(nd_type(node), node->u1.node, tmp, node->u3.node);
+	    }
+	    break;
+
+	case NODE_BMETHOD:
+	{
+	    VALUE body = rb_block_dup(node->nd_cval, data->klass, data->cref);
+	    node = NEW_BMETHOD(body);
+	    break;
+	}
+
+	case NODE_DMETHOD:
+	{
+	    VALUE body = rb_method_dup(node->nd_cval, data->klass, data->cref);
+	    node = NEW_DMETHOD(body);
+	    break;
+	}

-    if (fbody && nd_type(fbody) == NODE_SCOPE) {
-	VALUE cref = data->klass ?
-	    (VALUE)NEW_NODE(NODE_CREF,data->klass,0,fbody->nd_rval) :
-	    fbody->nd_rval;
-	fbody = NEW_NODE(NODE_SCOPE, fbody->nd_tbl, cref, fbody->nd_next);
+	}
     }
-    st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(fbody, body->nd_noex));
+    st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(node, body->nd_noex));
     return ST_CONTINUE;
 }

+static VALUE
+singleton_class_clone_int(obj, cref)
+    VALUE obj, cref;
+{
+    VALUE klass = RBASIC(obj)->klass;
+
+    if (!FL_TEST(klass, FL_SINGLETON))
+	return klass;
+    else {
+	struct clone_method_data data;
+	/* copy singleton(unnamed) class */
+	NEWOBJ(clone, struct RClass);
+	OBJSETUP(clone, 0, RBASIC(klass)->flags);
+
+	if (BUILTIN_TYPE(obj) == T_CLASS) {
+	    RBASIC(clone)->klass = (VALUE)clone;
+	}
+	else {
+	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
+	}
+
+	clone->super = RCLASS(klass)->super;
+	clone->iv_tbl = 0;
+	clone->m_tbl = 0;
+	if (RCLASS(klass)->iv_tbl) {
+	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
+	}
+	clone->m_tbl = st_init_numtable();
+	data.tbl = clone->m_tbl;
+	data.klass = (VALUE)clone;
+	data.cref = cref;
+	st_foreach(RCLASS(klass)->m_tbl, clone_method, (st_data_t)&data);
+	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
+	FL_SET(clone, FL_SINGLETON);
+	return (VALUE)clone;
+    }
+}
+
 /* :nodoc: */
 VALUE
 rb_mod_init_copy(clone, orig)
@@ -78,8 +136,7 @@
 {
     rb_obj_init_copy(clone, orig);
     if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
-	RBASIC(clone)->klass = RBASIC(orig)->klass;
-	RBASIC(clone)->klass = rb_singleton_class_clone(clone);
+	RBASIC(clone)->klass = singleton_class_clone_int(orig, clone);
     }
     RCLASS(clone)->super = RCLASS(orig)->super;
     if (RCLASS(orig)->iv_tbl) {
@@ -94,9 +151,10 @@
     if (RCLASS(orig)->m_tbl) {
 	struct clone_method_data data;

-	data.tbl = RCLASS(clone)->m_tbl = st_init_numtable();
-	data.klass = (VALUE)clone;
-
+ 	RCLASS(clone)->m_tbl = st_init_numtable();
+	data.tbl = RCLASS(clone)->m_tbl;
+	data.klass = clone;
+	data.cref = clone;
 	st_foreach(RCLASS(orig)->m_tbl, clone_method, (st_data_t)&data);
     }

@@ -121,48 +179,7 @@
 rb_singleton_class_clone(obj)
     VALUE obj;
 {
-    VALUE klass = RBASIC(obj)->klass;
-
-    if (!FL_TEST(klass, FL_SINGLETON))
-	return klass;
-    else {
-	/* copy singleton(unnamed) class */
-	NEWOBJ(clone, struct RClass);
-	OBJSETUP(clone, 0, RBASIC(klass)->flags);
-
-	if (BUILTIN_TYPE(obj) == T_CLASS) {
-	    RBASIC(clone)->klass = (VALUE)clone;
-	}
-	else {
-	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
-	}
-
-	clone->super = RCLASS(klass)->super;
-	clone->iv_tbl = 0;
-	clone->m_tbl = 0;
-	if (RCLASS(klass)->iv_tbl) {
-	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
-	}
-	{
-	    struct clone_method_data data;
-
-	    data.tbl = clone->m_tbl = st_init_numtable();
-	    switch (TYPE(obj)) {
-	      case T_CLASS:
-	      case T_MODULE:
-		data.klass = obj;
-		break;
-	      default:
-		data.klass = 0;
-		break;
-	    }
-
-	    st_foreach(RCLASS(klass)->m_tbl, clone_method, (st_data_t)&data);
-	}
-	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
-	FL_SET(clone, FL_SINGLETON);
-	return (VALUE)clone;
-    }
+    return singleton_class_clone_int(obj, 0);
 }

 void
Index: eval.c
===================================================================
--- eval.c	(revision 15910)
+++ eval.c	(working copy)
@@ -8358,6 +8358,19 @@
     return bind;
 }

+VALUE
+rb_block_dup(self, klass, cref)
+    VALUE self, klass, cref;
+{
+    struct BLOCK *block;
+    VALUE obj = proc_dup(self);
+    Data_Get_Struct(obj, struct BLOCK, block);
+    block->klass = klass;
+    block->cref = NEW_NODE(nd_type(block->cref), cref,
block->cref->u2.node,
+			   block->cref->u3.node);
+    return obj;
+}
+
 /*
  *  call-seq:
  *     binding -> a_binding
@@ -9204,6 +9217,29 @@
     return clone;
 }

+VALUE
+rb_method_dup(self, klass, cref)
+    VALUE self;
+    VALUE klass;
+    VALUE cref;
+{
+    VALUE clone;
+    struct METHOD *orig, *data;
+
+    Data_Get_Struct(self, struct METHOD, orig);
+    clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark,
free, data);
+    *data = *orig;
+    data->rklass = klass;
+    if (data->body->nd_rval) {
+	NODE *tmp = NEW_NODE(nd_type(data->body->u2.node), cref,
+			     data->body->u2.node->u2.node,
+			     data->body->u2.node->u3.node);
+	data->body = NEW_NODE(nd_type(data->body), data->body->u1.node, tmp,
+			      data->body->u3.node);
+    }
+    return clone;
+}
+
 /*
  *  call-seq:
  *     meth.call(args, ...)    => obj

In This Thread