Permalink
Browse files

fix a bug when changing a method's visibility to public would not be …

…taken into account

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4544 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 29e274f commit 6aab6c5b2a46ef48f49dd79c6e865113f62ffaeb @lrz lrz committed Sep 27, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 vm_method.c
View
@@ -90,7 +90,7 @@ rb_export_method(VALUE klass, ID name, ID noex)
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 @@ rb_export_method(VALUE klass, ID name, ID noex)
}
}
- node->flags |= flags;
+ node->flags = flags;
}
void

0 comments on commit 6aab6c5

Please sign in to comment.