repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Updated RubySpec submodule to 9f66d0b1.
[rbx.git]
/
kernel
/
bootstrap
/
literals.rb
blob
6d486da357305d50d0c30f7cb03db3dc550880bd
1
class NilClass
2
def &(other)
3
false
4
end
5
6
def ^(other)
7
(other.nil? or other.equal?(false)) ? false : true
8
end
9
10
def to_s
11
""
12
end
13
14
def inspect
15
"nil"
16
end
17
18
def nil?
19
true
20
end
21
22
def to_a
23
[]
24
end
25
26
def to_f
27
0.0
28
end
29
30
def to_i
31
0
32
end
33
end
34
35
class UndefClass
36
def undef?
37
true
38
end
39
40
def to_s
41
"undef"
42
end
43
end
44
45
TRUE = true
46
FALSE = false
47
48
class TrueClass
49
def &(other)
50
(other.nil? or other.equal?(false)) ? false : true
51
end
52
53
def ^(other)
54
(other.nil? or other.equal?(false)) ? true : false
55
end
56
57
def |(other)
58
true
59
end
60
61
def to_s
62
"true"
63
end
64
65
end
66
67
class FalseClass
68
def &(other)
69
false
70
end
71
72
def ^(other)
73
(other.equal?(false) or other.nil?) ? false : true
74
end
75
76
def to_s
77
"false"
78
end
79
end