X7ROOT File Manager
Current Path:
/opt/alt/ruby18/lib64/ruby/1.8
opt
/
alt
/
ruby18
/
lib64
/
ruby
/
1.8
/
??
..
??
English.rb
(5.6 KB)
??
Env.rb
(274 B)
??
abbrev.rb
(2.5 KB)
??
base64.rb
(3.37 KB)
??
benchmark.rb
(17.73 KB)
??
bigdecimal
??
cgi
??
cgi-lib.rb
(6.89 KB)
??
cgi.rb
(73.74 KB)
??
complex.rb
(12.84 KB)
??
csv.rb
(24.46 KB)
??
date
??
date.rb
(53.02 KB)
??
date2.rb
(128 B)
??
debug.rb
(20.61 KB)
??
delegate.rb
(8.81 KB)
??
digest
??
digest.rb
(1.12 KB)
??
dl
??
drb
??
drb.rb
(19 B)
??
e2mmap.rb
(4.04 KB)
??
erb.rb
(21.38 KB)
??
eregex.rb
(487 B)
??
expect.rb
(633 B)
??
fileutils.rb
(42.23 KB)
??
finalize.rb
(5.38 KB)
??
find.rb
(1.84 KB)
??
forwardable.rb
(6.16 KB)
??
ftools.rb
(6.17 KB)
??
generator.rb
(8.1 KB)
??
getoptlong.rb
(14.88 KB)
??
getopts.rb
(2.25 KB)
??
gserver.rb
(6.43 KB)
??
importenv.rb
(590 B)
??
io
??
ipaddr.rb
(21.96 KB)
??
irb
??
irb.rb
(7.43 KB)
??
jcode.rb
(4.3 KB)
??
kconv.rb
(8.12 KB)
??
logger.rb
(17.59 KB)
??
mailread.rb
(1.28 KB)
??
mathn.rb
(5.42 KB)
??
matrix.rb
(27.21 KB)
??
md5.rb
(411 B)
??
mkmf.rb
(50.65 KB)
??
monitor.rb
(7.93 KB)
??
mutex_m.rb
(2.07 KB)
??
net
??
observer.rb
(5.15 KB)
??
open-uri.rb
(20.49 KB)
??
open3.rb
(2.1 KB)
??
openssl
??
openssl.rb
(575 B)
??
optparse
??
optparse.rb
(47.12 KB)
??
ostruct.rb
(3.35 KB)
??
parsearg.rb
(1.55 KB)
??
parsedate.rb
(1.33 KB)
??
pathname.rb
(29.39 KB)
??
ping.rb
(1.48 KB)
??
pp.rb
(15.97 KB)
??
prettyprint.rb
(18.33 KB)
??
profile.rb
(90 B)
??
profiler.rb
(1.59 KB)
??
pstore.rb
(11.15 KB)
??
racc
??
rational.rb
(12.05 KB)
??
rdoc
??
readbytes.rb
(835 B)
??
resolv-replace.rb
(1.55 KB)
??
resolv.rb
(56.83 KB)
??
rexml
??
rinda
??
rss
??
rss.rb
(504 B)
??
rubyunit.rb
(180 B)
??
runit
??
scanf.rb
(20.63 KB)
??
securerandom.rb
(4.27 KB)
??
set.rb
(27.08 KB)
??
sha1.rb
(418 B)
??
shell
??
shell.rb
(4.66 KB)
??
shellwords.rb
(3.99 KB)
??
singleton.rb
(8.08 KB)
??
soap
??
sync.rb
(6.09 KB)
??
tempfile.rb
(4.86 KB)
??
test
??
thread.rb
(104 B)
??
thwait.rb
(4.32 KB)
??
time.rb
(31.58 KB)
??
timeout.rb
(3 KB)
??
tmpdir.rb
(3.69 KB)
??
tracer.rb
(2.73 KB)
??
tsort.rb
(7.99 KB)
??
un.rb
(4.54 KB)
??
uri
??
uri.rb
(710 B)
??
weakref.rb
(2.68 KB)
??
webrick
??
webrick.rb
(811 B)
??
wsdl
??
x86_64-linux
??
xmlrpc
??
xsd
??
yaml
??
yaml.rb
(12.36 KB)
Editing: jcode.rb
# jcode.rb - ruby code to handle japanese (EUC/SJIS) string if $VERBOSE && $KCODE == "NONE" warn "Warning: $KCODE is NONE." end $vsave, $VERBOSE = $VERBOSE, false class String warn "feel free for some warnings:\n" if $VERBOSE def _regex_quote(str) str.gsub(/(\\[\[\]\-\\])|\\(.)|([\[\]\\])/) do $1 || $2 || '\\' + $3 end end private :_regex_quote PATTERN_SJIS = '[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]' PATTERN_EUC = '[\xa1-\xfe][\xa1-\xfe]' PATTERN_UTF8 = '[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]' RE_SJIS = Regexp.new(PATTERN_SJIS, 0, 'n') RE_EUC = Regexp.new(PATTERN_EUC, 0, 'n') RE_UTF8 = Regexp.new(PATTERN_UTF8, 0, 'n') SUCC = {} SUCC['s'] = Hash.new(1) for i in 0 .. 0x3f SUCC['s'][i.chr] = 0x40 - i end SUCC['s']["\x7e"] = 0x80 - 0x7e SUCC['s']["\xfd"] = 0x100 - 0xfd SUCC['s']["\xfe"] = 0x100 - 0xfe SUCC['s']["\xff"] = 0x100 - 0xff SUCC['e'] = Hash.new(1) for i in 0 .. 0xa0 SUCC['e'][i.chr] = 0xa1 - i end SUCC['e']["\xfe"] = 2 SUCC['u'] = Hash.new(1) for i in 0 .. 0x7f SUCC['u'][i.chr] = 0x80 - i end SUCC['u']["\xbf"] = 0x100 - 0xbf def mbchar? case $KCODE[0] when ?s, ?S self =~ RE_SJIS when ?e, ?E self =~ RE_EUC when ?u, ?U self =~ RE_UTF8 else nil end end def end_regexp case $KCODE[0] when ?s, ?S /#{PATTERN_SJIS}$/on when ?e, ?E /#{PATTERN_EUC}$/on when ?u, ?U /#{PATTERN_UTF8}$/on else /.$/on end end alias original_succ! succ! private :original_succ! alias original_succ succ private :original_succ def succ! reg = end_regexp if $KCODE != 'NONE' && self =~ reg succ_table = SUCC[$KCODE[0,1].downcase] begin self[-1] += succ_table[self[-1]] self[-2] += 1 if self[-1] == 0 end while self !~ reg self else original_succ! end end def succ str = self.dup str.succ! or str end private def _expand_ch str a = [] str.scan(/(?:\\(.)|([^\\]))-(?:\\(.)|([^\\]))|(?:\\(.)|(.))/m) do from = $1 || $2 to = $3 || $4 one = $5 || $6 if one a.push one elsif from.length != to.length next elsif from.length == 1 from[0].upto(to[0]) { |c| a.push c.chr } else from.upto(to) { |c| a.push c } end end a end def expand_ch_hash from, to h = {} afrom = _expand_ch(from) ato = _expand_ch(to) afrom.each_with_index do |x,i| h[x] = ato[i] || ato[-1] end h end HashCache = {} TrPatternCache = {} DeletePatternCache = {} SqueezePatternCache = {} public def tr!(from, to) return nil if from == "" return self.delete!(from) if to == "" pattern = TrPatternCache[from] ||= /[#{_regex_quote(from)}]/ if from[0] == ?^ last = /.$/.match(to)[0] self.gsub!(pattern, last) else h = HashCache[from + "1-0" + to] ||= expand_ch_hash(from, to) self.gsub!(pattern) do |c| h[c] end end end def tr(from, to) (str = self.dup).tr!(from, to) or str end def delete!(del) return nil if del == "" self.gsub!(DeletePatternCache[del] ||= /[#{_regex_quote(del)}]+/, '') end def delete(del) (str = self.dup).delete!(del) or str end def squeeze!(del=nil) return nil if del == "" pattern = if del SqueezePatternCache[del] ||= /([#{_regex_quote(del)}])\1+/ else /(.|\n)\1+/ end self.gsub!(pattern, '\1') end def squeeze(del=nil) (str = self.dup).squeeze!(del) or str end def tr_s!(from, to) return self.delete!(from) if to.length == 0 pattern = SqueezePatternCache[from] ||= /([#{_regex_quote(from)}])\1*/ if from[0] == ?^ last = /.$/.match(to)[0] self.gsub!(pattern, last) else h = HashCache[from + "1-0" + to] ||= expand_ch_hash(from, to) self.gsub!(pattern) do h[$1] end end end def tr_s(from, to) (str = self.dup).tr_s!(from,to) or str end def chop! self.gsub!(/(?:.|\r?\n)\z/, '') end def chop (str = self.dup).chop! or str end def jlength self.gsub(/[^\Wa-zA-Z_\d]/, ' ').length end alias jsize jlength def jcount(str) self.delete("^#{str}").jlength end def each_char if block_given? scan(/./m) do |x| yield x end else scan(/./m) end end end $VERBOSE = $vsave
Upload File
Create Folder