Skip to content
Permalink
Browse files

Merge pull request #759 from kachick/alias_method_checks_frozen

Module#alias_method should raise a RuntimeError on frozen instance
  • Loading branch information
alex committed Jun 23, 2013
2 parents 73024e1 + befbb14 commit 8fee369bd0e88914b69e4470cd7ecc57bc4060a7
Showing with 1 addition and 1 deletion.
  1. +0 −1 spec/tags/core/module/alias_method_tags.txt
  2. +1 −0 topaz/objects/moduleobject.py
@@ -1,4 +1,3 @@
fails:Module#alias_method retains method visibility
fails:Module#alias_method fails if origin method not found
fails:Module#alias_method raises RuntimeError if frozen
fails:Module#alias_method is a private method
@@ -487,6 +487,7 @@ def method_public_class_method(self, space, w_name):
return space.send(w_cls, "public", [w_name])

@classdef.method("alias_method", new_name="symbol", old_name="symbol")
@check_frozen()
def method_alias_method(self, space, new_name, old_name):
w_method = self.find_method(space, old_name)
if w_method is None:

0 comments on commit 8fee369

Please sign in to comment.
You can’t perform that action at this time.