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
Post a Comment