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
Temporary tag for this failure. Updated CI spec coming.
[rbx.git]
/
kernel
/
core
/
lookuptable.rb
blob
6174e034ddb7039eb3672e14a263f254427429df
1
# depends on: enumerable.rb
2
3
class LookupTable
4
include Enumerable
5
6
def empty?
7
@entries == 0
8
end
9
10
def to_s
11
"#<#{self.class}:0x#{object_id.to_s(16)} #{entries} entries>"
12
end
13
14
def inspect
15
ents = collect { |k,v| " #{k.inspect}=>#{v}" }.join(",")
16
"#<#{self.class}" + ents + ">"
17
end
18
end