Skip to content
Permalink
Browse files

More passing specs

  • Loading branch information
alex committed Jun 23, 2013
1 parent e325f4d commit a337251d59c523093c1a299f665e88f1be0a4de6

This file was deleted.

This file was deleted.

@@ -1,11 +1,2 @@
fails:Kernel#public_methods returns a list of the names of publicly accessible methods in the object
fails:Kernel#public_methods returns a list of the names of publicly accessible methods in the object and its ancestors and mixed-in modules
fails:Kernel#public_methods returns methods mixed in to the metaclass
fails:Kernel#public_methods when not passed an argument returns a unique list for an object extended by a module
fails:Kernel#public_methods when not passed an argument returns a unique list for a class including a module
fails:Kernel#public_methods when not passed an argument returns a unique list for a subclass of a class that includes a module
fails:Kernel#public_methods when passed true returns a unique list for an object extended by a module
fails:Kernel#public_methods when passed true returns a unique list for a class including a module
fails:Kernel#public_methods when passed true returns a unique list for a subclass of a class that includes a module
fails:Kernel#public_methods returns a list of names without protected accessible methods in the object
fails:Kernel#public_methods returns public methods for immediates
@@ -14,6 +14,7 @@
from topaz.modules.process import Process
from topaz.objects.bindingobject import W_BindingObject
from topaz.objects.exceptionobject import W_ExceptionObject
from topaz.objects.functionobject import W_FunctionObject
from topaz.objects.moduleobject import W_ModuleObject
from topaz.objects.procobject import W_ProcObject
from topaz.objects.randomobject import W_RandomObject
@@ -43,8 +44,34 @@ def method_singleton_methods(self, space, all=True):
@moduledef.method("methods", inherit="bool")
def method_methods(self, space, inherit=True):
w_cls = space.getclass(self)
return space.newarray([
space.newsymbol(m)
for m in w_cls.methods(space, inherit=inherit)
])

return space.newarray([space.newsymbol(m) for m in w_cls.methods(space, inherit=inherit)])
@moduledef.method("private_methods", inherit="bool")
def method_private_methods(self, space, inherit=True):
w_cls = space.getclass(self)
return space.newarray([
space.newsymbol(m)
for m in w_cls.methods(space, visibility=W_FunctionObject.PRIVATE, inherit=inherit)
])

@moduledef.method("protected_methods", inherit="bool")
def method_protected_methods(self, space, inherit=True):
w_cls = space.getclass(self)
return space.newarray([
space.newsymbol(m)
for m in w_cls.methods(space, visibility=W_FunctionObject.PROTECTED, inherit=inherit)
])

@moduledef.method("public_methods", inherit="bool")
def method_public_methods(self, space, inherit=True):
w_cls = space.getclass(self)
return space.newarray([
space.newsymbol(m)
for m in w_cls.methods(space, visibility=W_FunctionObject.PUBLIC, inherit=inherit)
])

@moduledef.method("lambda")
def function_lambda(self, space, block):

0 comments on commit a337251

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