Skip to content
Permalink
Browse files

Merge pull request #633 from kachick/implement-kernel-__callee__

Implement Kernel#__callee__
  • Loading branch information
alex committed Apr 19, 2013
2 parents 6d108ef + ca5a51d commit 8bd0c53dd90cfcc60aaba66ad24d821ea942fcec
Showing with 1 addition and 3 deletions.
  1. +0 −3 spec/tags/core/kernel/__callee___tags.txt
  2. +1 −0 topaz/modules/kernel.py
@@ -1,9 +1,6 @@
fails:Kernel.__callee__ returns the current method, even when aliased
fails:Kernel.__callee__ returns the original name when aliased method
fails:Kernel.__callee__ returns the caller from blocks too
fails:Kernel.__callee__ returns the caller from define_method too
fails:Kernel.__callee__ returns the caller from block inside define_method too
fails:Kernel.__callee__ returns the caller from a define_method called from the same class
fails:Kernel.__callee__ returns method name even from eval
fails:Kernel.__callee__ returns nil when not called from a method
fails:Kernel.__callee__ returns the caller when sent as a string
@@ -162,6 +162,7 @@ def method_binding(self, space):
return space.newbinding_fromframe(space.getexecutioncontext().gettoprubyframe())

@moduledef.function("__method__")
@moduledef.function("__callee__")
def method_method(self, space):
frame = space.getexecutioncontext().gettoprubyframe()
return space.newsymbol(frame.bytecode.name)

0 comments on commit 8bd0c53

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