repo.or.cz
/
ruby-80x24.org.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* 2022-01-18 [ci skip]
[ruby-80x24.org.git]
/
nilclass.rb
blob
5a2e19680dcae9f32d4ac83772353d119caa26ae
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
13
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