Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
ruby /
2.3.0 /
irb /
Delete
Unzip
Name
Size
Permission
Date
Action
cmd
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
ext
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
lc
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
completion.rb
6.48
KB
-rw-r--r--
2016-11-21 08:58
context.rb
12.39
KB
-rw-r--r--
2016-11-21 08:58
extend-command.rb
9.71
KB
-rw-r--r--
2016-11-21 08:58
frame.rb
1.91
KB
-rw-r--r--
2016-11-21 08:58
help.rb
697
B
-rw-r--r--
2016-11-21 08:58
init.rb
7.62
KB
-rw-r--r--
2016-11-21 08:58
input-method.rb
4.63
KB
-rw-r--r--
2016-11-21 08:58
inspector.rb
3.61
KB
-rw-r--r--
2016-11-21 08:58
locale.rb
4.61
KB
-rw-r--r--
2016-11-21 08:58
magic-file.rb
924
B
-rw-r--r--
2016-11-21 08:58
notifier.rb
7.17
KB
-rw-r--r--
2016-11-21 08:58
output-method.rb
2.43
KB
-rw-r--r--
2016-11-21 08:58
ruby-lex.rb
24.02
KB
-rw-r--r--
2016-11-21 08:58
ruby-token.rb
7.36
KB
-rw-r--r--
2016-11-21 08:58
slex.rb
6.82
KB
-rw-r--r--
2016-11-21 08:58
src_encoding.rb
121
B
-rw-r--r--
2016-11-21 08:58
version.rb
274
B
-rw-r--r--
2016-11-21 08:58
workspace.rb
3.26
KB
-rw-r--r--
2016-11-21 08:58
ws-for-case-2.rb
218
B
-rw-r--r--
2016-11-21 08:58
xmp.rb
4.01
KB
-rw-r--r--
2016-11-21 08:58
Save
Rename
# frozen_string_literal: false # # 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? 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 # dependent 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