object - Is Ruby's `BasicObject.new` undocumented? -


i want read ruby documentation new method, in:

class dog end  fido = dog.new("fido") 

but tracing through ruby docs leads me this:

new()

not documented

am looking in wrong place, or 1 of ubiquitous methods undocumented?

looking @ dog.new("fido"),i sure looking class#new,not basicobject#new. because dog class instance of class.

class dog     #code end dog.instance_of? class # => true 

more examples :

foo = class.new # class::new called foo.instance_of? class # => true foo = foo.new # class#new called foo.instance_of? foo   # => true 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -