Revision
4544
Author
lsansonetti@apple.com
Date
2010-09-27 15:55:31 -0700 (Mon, 27 Sep 2010)

Log Message

fix a bug when changing a method's visibility to public would not be taken into account

Modified Paths

Diff

Modified: MacRuby/trunk/vm_method.c (4543 => 4544)


--- MacRuby/trunk/vm_method.c	2010-09-27 21:28:06 UTC (rev 4543)
+++ MacRuby/trunk/vm_method.c	2010-09-27 22:55:31 UTC (rev 4544)
@@ -90,7 +90,7 @@
 		sel_getName(sel));
     }
 
-    long flags = 0;
+    long flags = (node->flags & ~VM_METHOD_PRIVATE) & ~VM_METHOD_PROTECTED;
     switch (noex) {
 	case NOEX_PRIVATE:
 	    flags |= VM_METHOD_PRIVATE;
@@ -125,7 +125,7 @@
 	}
     }
 
-    node->flags |= flags;
+    node->flags = flags;
 }
 
 void