ClassName( ) e.g. Integer( 3.5 )

Evan Farrar evanfarrar at gmail.com
Thu Jul 9 08:40:42 JST 2015


Integer( ) is a helper method defined on Kernel, not a special syntax.

> On Jul 8, 2015, at 4:34 PM, Chris Freyberg <chris at furor.co.nz> wrote:
> 
> I found a use of this syntax in some Ruby code, but could not find anything in ruby-doc about by Google search.
> 
> Is ClassName() syntactic sugar for ClassName.new() or is it something else?
> Has it been deprecated or discouraged ( or some other reason why it is difficult to find in ruby-doc )?
> 
> Ta
> 
> 
> 
> 


More information about the ruby-doc mailing list