Skip to content
Permalink
Browse files

more passing module specs

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 28, 2013
1 parent 335943e commit af3f4d0ed45d8e2f95adc586be2e971552f20a86
@@ -1,3 +1,2 @@
fails:Module#attr_writer is a private method
fails:Module#attr_writer applies current visibility to methods created
fails:Module#attr_writer converts non string/symbol/fixnum names to strings using to_str
@@ -1,3 +1 @@
fails:Module#extended is called when an object gets extended with self
fails:Module#extended is called after Module#extend_object
fails:Module#extended is private in its default implementation
@@ -1,3 +1 @@
fails:Module#included is invoked when self is included in another module or class
fails:Module#included allows extending self with the object into which it is being included
fails:Module#included is private in its default implementation
@@ -1,2 +1 @@
fails:Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules
fails:Module#method_defined? converts the given name to a string using to_str
@@ -1,9 +1,6 @@
fails:Module#module_function with specific method names creates duplicates of the given instance methods on the Module object
fails:Module#module_function with specific method names returns the current module
fails:Module#module_function with specific method names makes the instance methods private
fails:Module#module_function with specific method names makes the new Module methods public
fails:Module#module_function with specific method names tries to convert the given names to strings using to_str
fails:Module#module_function with specific method names raises a TypeError when the given names can't be converted to string using to_str
fails:Module#module_function as a toggle (no arguments) in a Module body makes any subsequently defined methods module functions with the normal semantics
fails:Module#module_function as a toggle (no arguments) in a Module body returns the current module
fails:Module#module_function as a toggle (no arguments) in a Module body stops creating module functions if the body encounters another toggle like public/protected/private without arguments
@@ -2,6 +2,5 @@ fails:Module#public_class_method makes an existing class method public
fails:Module#public_class_method makes an existing class method public up the inheritance tree
fails:Module#public_class_method accepts more than one method at a time
fails:Module#public_class_method raises a NameError if class method doesn't exist
fails:Module#public_class_method makes a class method public
fails:Module#public_class_method raises a NameError when the given name is not a method
fails:Module#public_class_method raises a NameError when the given name is an instance method
@@ -1,4 +1,3 @@
fails:Module#remove_class_variable removes class variable
fails:Module#remove_class_variable returns the value of removing class variable
fails:Module#remove_class_variable removes a class variable defined in a metaclass
fails:Module#remove_class_variable is public
@@ -377,7 +377,7 @@ def method_attr(self, space, args_w):
@classdef.method("module_function")
def method_module_function(self, space, args_w):
for w_arg in args_w:
name = space.symbol_w(w_arg)
name = Coerce.symbol(space, w_arg)
self.attach_method(space, name, self._find_method_pure(space, name, self.version))

@classdef.method("private_class_method")

0 comments on commit af3f4d0

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