[#4766] Wiki — "Glen Stampoultzis" <trinexus@...>

21 messages 2000/09/04
[#4768] RE: Wiki — "NAKAMURA, Hiroshi" <nahi@...> 2000/09/04

Hi, Glen,

[#4783] Re: Wiki — Masatoshi SEKI <m_seki@...> 2000/09/04

[#4785] Re: Wiki — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/09/05

Howdy,

[#4883] Re-binding a block — Dave Thomas <Dave@...>

16 messages 2000/09/12

[#4930] Perl 6 rumblings -- RFC 225 (v1) Data: Superpositions — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/09/15

[#4936] Ruby Book Eng. translation editor's questions — Jon Babcock <jon@...>

20 messages 2000/09/16

[#5045] Proposal: Add constants to Math — Robert Feldt <feldt@...>

15 messages 2000/09/21

[#5077] Crazy idea? infix method calls — hal9000@...

This is a generalization of the "in" operator idea which I

17 messages 2000/09/22

[#5157] Compile Problem with 1.6.1 — Scott Billings <aerogems@...>

When I try to compile Ruby 1.6.1, I get the following error:

15 messages 2000/09/27

[ruby-talk:5099] Re: binding weirdness

From: matz@... (Yukihiro Matsumoto)
Date: 2000-09-25 09:15:54 UTC
List: ruby-talk #5099
Hi,

In message "[ruby-talk:5093] binding weirdness"
    on 00/09/25, "Brian F. Feldman" <green@FreeBSD.org> writes:

|I notice that (using 1.6.0 and 1.6.1 snapshot; finding some other kinda 
|strange problems, too...) binding acts very strangely with regard to 
|defining a method after it has been previously accessed with an error.  

I think it's caused by method cache inconsistency.  Try the following
patch, please.

--- eval.c	2000/09/22 18:15:41	1.109
+++ eval.c	2000/09/25 09:14:42
@@ -240,2 +240,3 @@
     st_insert(RCLASS(klass)->m_tbl, mid, body);
+    rb_clear_cache_by_id(mid);
 }
@@ -360,3 +361,2 @@
     else {
-	rb_clear_cache_by_id(mid);
 	rb_add_method(klass, mid, 0, NOEX_UNDEF);
@@ -410,3 +410,2 @@
 	else {
-	    rb_clear_cache_by_id(name);
 	    rb_add_method(klass, name, NEW_ZSUPER(), noex);
@@ -1497,3 +1496,2 @@
     rb_add_method(klass, id, 0, NOEX_PUBLIC);
-    rb_clear_cache_by_id(id);
 }
@@ -2827,3 +2825,2 @@
 		}
-		rb_clear_cache_by_id(node->nd_mid);
 		if (node->nd_noex) { /* toplevel */
@@ -2893,3 +2890,2 @@
 	    }
-	    rb_clear_cache_by_id(node->nd_mid);
 	    rb_add_method(klass, node->nd_mid, node->nd_defn, 
@@ -5042,4 +5038,4 @@
 	}
-	len = strlen(feature);
-	if (strncmp(f, feature, len) == 0) {
+	len = strlen(f);
+	if (strncmp(f, feature, strlen(feature)) == 0) {
 	    if (strcmp(f+len, ".so") == 0) {
@@ -5350,3 +5346,2 @@
 	}
-	rb_clear_cache_by_id(id);
 	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);

In This Thread