blob: 49be76b15041dbb8021469f0541ebd713d74ca29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Object.send :remove_const, :PACK_IDX_SIGNATURE
PACK_IDX_SIGNATURE = "\377tOc".b
class String
if self.method_defined?(:ord)
def getord(offset); self[offset].ord; end
else
alias :getord :[]
end
unless self.method_defined?(:b)
if self.method_defined?(:force_encoding)
def b; self.dup.force_encoding(Encoding::ASCII_8BIT); end
else
def b; self.dup; end
end
end
end
|