Skip to content
Permalink
Browse files

initialize and initialize_copy are autoamtically private, I don't kno…

…w why
  • Loading branch information
alex committed Jun 22, 2013
1 parent bf1fa01 commit 9a20c6209c7865bbcfb5d1476f2fa4b4026098e4
@@ -17,7 +17,6 @@ def initialize(size_or_arr = nil, obj = nil, &block)
end
return self
end
private :initialize

def self.[](*args)
args.inject(allocate) { |array, arg| array << arg}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,4 +1,3 @@
fails:String#initialize is a private method
fails:String#initialize with an argument returns self
fails:String#initialize with an argument taints self if other is tainted
fails:String#initialize with an argument untrusts self if other is untrusted
@@ -1,5 +1,3 @@
fails:Defining an 'initialize' method sets the method's visibility to private
fails:Defining an 'initialize_copy' method sets the method's visibility to private
fails:A singleton method definition raises RuntimeError if frozen
fails:A method defined with extreme default arguments may use an fcall as a default
fails:A singleton method defined with extreme default arguments may use an fcall as a default
@@ -131,6 +131,8 @@ def mutated(self):
self.version = VersionTag()

def define_method(self, space, name, method):
if name == "initialize" or name == "initialize_copy":
method.update_visibility(W_FunctionObject.PRIVATE)
self.mutated()
self.methods_w[name] = method
if not space.bootstrap:

0 comments on commit 9a20c62

Please sign in to comment.