Linux premium71.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
Server IP : 198.187.29.8 & Your IP : 18.191.165.88
Domains :
Cant Read [ /etc/named.conf ]
User : cleahvkv
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby20 /
lib64 /
ruby /
2.0.0 /
irb /
Delete
Unzip
Name
Size
Permission
Date
Action
cmd
[ DIR ]
drwxr-xr-x
2024-03-03 22:43
ext
[ DIR ]
drwxr-xr-x
2024-03-03 22:43
lc
[ DIR ]
drwxr-xr-x
2024-03-03 22:43
completion.rb
6.12
KB
-rw-r--r--
2012-12-29 12:59
context.rb
11.91
KB
-rw-r--r--
2013-02-04 22:36
extend-command.rb
9.54
KB
-rw-r--r--
2012-12-21 05:45
frame.rb
1.87
KB
-rw-r--r--
2012-12-21 05:45
help.rb
613
B
-rw-r--r--
2012-12-21 05:45
init.rb
7.07
KB
-rw-r--r--
2012-12-26 03:55
input-method.rb
4.58
KB
-rw-r--r--
2012-12-21 17:29
inspector.rb
3.9
KB
-rw-r--r--
2012-12-26 14:56
locale.rb
4.43
KB
-rw-r--r--
2012-12-13 05:22
magic-file.rb
893
B
-rw-r--r--
2012-12-10 02:06
notifier.rb
6.87
KB
-rw-r--r--
2012-12-21 05:45
output-method.rb
2.39
KB
-rw-r--r--
2012-12-25 13:34
ruby-lex.rb
22.59
KB
-rw-r--r--
2012-12-27 14:48
ruby-token.rb
7.3
KB
-rw-r--r--
2012-12-13 05:22
slex.rb
5.95
KB
-rw-r--r--
2012-12-21 17:36
src_encoding.rb
90
B
-rw-r--r--
2009-10-02 10:45
version.rb
251
B
-rw-r--r--
2012-12-13 05:22
workspace.rb
2.78
KB
-rw-r--r--
2012-12-25 18:10
ws-for-case-2.rb
195
B
-rw-r--r--
2010-11-08 20:59
xmp.rb
4.03
KB
-rw-r--r--
2012-12-21 05:45
Save
Rename
# # irb/inspector.rb - inspect methods # $Release Version: 0.9.6$ # $Revision: 1.19 $ # $Date: 2002/06/11 07:51:31 $ # by Keiju ISHITSUKA(keiju@ruby-lang.org) # # -- # # # module IRB # :nodoc: # Convenience method to create a new Inspector, using the given +inspect+ # proc, and optional +init+ proc and passes them to Inspector.new # # irb(main):001:0> ins = IRB::Inspector(proc{ |v| "omg! #{v}" }) # irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! #<IRB::Inspector:0x007f46f7ba7d28> # irb(main):001:0> "what?" #=> omg! what? # def IRB::Inspector(inspect, init = nil) Inspector.new(inspect, init) end # An irb inspector # # In order to create your own custom inspector there are two things you # should be aware of: # # Inspector uses #inspect_value, or +inspect_proc+, for output of return values. # # This also allows for an optional #init+, or +init_proc+, which is called # when the inspector is activated. # # Knowing this, you can create a rudimentary inspector as follows: # # irb(main):001:0> ins = IRB::Inspector.new(proc{ |v| "omg! #{v}" }) # irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! #<IRB::Inspector:0x007f46f7ba7d28> # irb(main):001:0> "what?" #=> omg! what? # class Inspector # Default inspectors available to irb, this includes: # # +:pp+:: Using Kernel#pretty_inspect # +:yaml+:: Using YAML.dump # +:marshal+:: Using Marshal.dump INSPECTORS = {} # Determines the inspector to use where +inspector+ is one of the keys passed # during inspector definition. def self.keys_with_inspector(inspector) INSPECTORS.select{|k,v| v == inspector}.collect{|k, v| k} end # Example # # Inspector.def_inspector(key, init_p=nil){|v| v.inspect} # Inspector.def_inspector([key1,..], init_p=nil){|v| v.inspect} # Inspector.def_inspector(key, inspector) # Inspector.def_inspector([key1,...], inspector) def self.def_inspector(key, arg=nil, &block) # if !block_given? # case arg # when nil, Proc # inspector = IRB::Inspector(init_p) # when Inspector # inspector = init_p # else # IRB.Raise IllegalParameter, init_p # end # init_p = nil # else # inspector = IRB::Inspector(block, init_p) # end if block_given? inspector = IRB::Inspector(block, arg) else inspector = arg end case key when Array for k in key def_inspector(k, inspector) end when Symbol INSPECTORS[key] = inspector INSPECTORS[key.to_s] = inspector when String INSPECTORS[key] = inspector INSPECTORS[key.intern] = inspector else INSPECTORS[key] = inspector end end # Creates a new inspector object, using the given +inspect_proc+ when # output return values in irb. def initialize(inspect_proc, init_proc = nil) @init = init_proc @inspect = inspect_proc end # Proc to call when the inspector is activated, good for requiring # dependant libraries. def init @init.call if @init end # Proc to call when the input is evaluated and output in irb. def inspect_value(v) @inspect.call(v) end end Inspector.def_inspector([false, :to_s, :raw]){|v| v.to_s} Inspector.def_inspector([true, :p, :inspect]){|v| begin v.inspect rescue NoMethodError puts "(Object doesn't support #inspect)" end } Inspector.def_inspector([:pp, :pretty_inspect], proc{require "pp"}){|v| v.pretty_inspect.chomp} Inspector.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v| begin YAML.dump(v) rescue puts "(can't dump yaml. use inspect)" v.inspect end } Inspector.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v| Marshal.dump(v) } end