From: w wg [mailto:
[email protected]] :
# I typed "ri Kernel", but I can't find any Kernel's class method.
C:\family\ruby>qri integer
--------------------------------------------------------- Kernel#Integer
Integer(arg) =3D> integer
------------------------------------------------------------------------
Converts _arg_ to a +Fixnum+ or +Bignum+. Numeric types are
converted directly (with floating point numbers being truncated).
If _arg_ is a +String+, leading radix indicators (+0+, +0b+, and
+0x+) are honored. Others are converted using +to_int+ and +to_i+.
This behavior is different from that of +String#to_i+.
Integer(123.999) #=3D> 123
Integer("0x1a") #=3D> 26
Integer(Time.new) #=3D> 1049896590
same w qri kernel#integer