Tempfile document updated.
[ruby.git] / nilclass.rb
blob5a2e19680dcae9f32d4ac83772353d119caa26ae
1 class NilClass
2   #
3   #  call-seq:
4   #     nil.to_i -> 0
5   #
6   #  Always returns zero.
7   #
8   #     nil.to_i   #=> 0
9   #
10   def to_i
11     return 0
12   end
14   #
15   #  call-seq:
16   #     nil.to_f    -> 0.0
17   #
18   #  Always returns zero.
19   #
20   #     nil.to_f   #=> 0.0
21   #
22   def to_f
23     return 0.0
24   end
25 end