method

to_r

v1_9_2_180 - Show latest stable - Class: Integer
to_r()
public

Returns the value as a rational.

For example:

1.to_r        #=> (1/1)
(1<<64).to_r  #=> (18446744073709551616/1)