OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
ruby
/
2.5.0
/
irb
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
cmd
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
completion.rb
6.49 KB
12/16/2015 05:07:31 AM
rw-r--r--
📄
context.rb
12.36 KB
04/20/2017 09:11:36 AM
rw-r--r--
📁
ext
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
extend-command.rb
9.62 KB
04/20/2017 09:11:36 AM
rw-r--r--
📄
frame.rb
1.92 KB
12/16/2015 05:07:31 AM
rw-r--r--
📄
help.rb
705 bytes
12/16/2015 05:07:31 AM
rw-r--r--
📄
init.rb
7.58 KB
12/12/2017 03:01:07 PM
rw-r--r--
📄
input-method.rb
4.63 KB
12/16/2015 05:07:31 AM
rw-r--r--
📄
inspector.rb
3.61 KB
12/16/2015 05:07:31 AM
rw-r--r--
📁
lc
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
locale.rb
4.64 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
magic-file.rb
928 bytes
06/15/2017 10:43:17 AM
rw-r--r--
📄
notifier.rb
7.18 KB
10/07/2016 05:18:57 AM
rw-r--r--
📄
output-method.rb
2.44 KB
10/07/2016 05:18:57 AM
rw-r--r--
📄
ruby-lex.rb
24.21 KB
04/20/2017 11:07:02 AM
rw-r--r--
📄
ruby-token.rb
7.37 KB
12/16/2015 05:07:31 AM
rw-r--r--
📄
slex.rb
6.83 KB
01/09/2017 02:45:28 AM
rw-r--r--
📄
src_encoding.rb
147 bytes
06/15/2017 10:43:17 AM
rw-r--r--
📄
version.rb
282 bytes
12/16/2015 05:07:31 AM
rw-r--r--
📄
workspace.rb
3.89 KB
11/24/2017 11:00:10 AM
rw-r--r--
📄
ws-for-case-2.rb
226 bytes
12/16/2015 05:07:31 AM
rw-r--r--
📄
xmp.rb
4.02 KB
12/16/2015 05:07:31 AM
rw-r--r--
Editing: frame.rb
Close
# frozen_string_literal: false # # frame.rb - # $Release Version: 0.9$ # $Revision: 53141 $ # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd) # # -- # # # require "e2mmap" module IRB class Frame extend Exception2MessageMapper def_exception :FrameOverflow, "frame overflow" def_exception :FrameUnderflow, "frame underflow" # Default number of stack frames INIT_STACK_TIMES = 3 # Default number of frames offset CALL_STACK_OFFSET = 3 # Creates a new stack frame def initialize @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES end # Used by Kernel#set_trace_func to register each event in the call stack def trace_func(event, file, line, id, binding) case event when 'call', 'class' @frames.push binding when 'return', 'end' @frames.pop end end # Returns the +n+ number of frames on the call stack from the last frame # initialized. # # Raises FrameUnderflow if there are no frames in the given stack range. def top(n = 0) bind = @frames[-(n + CALL_STACK_OFFSET)] Fail FrameUnderflow unless bind bind end # Returns the +n+ number of frames on the call stack from the first frame # initialized. # # Raises FrameOverflow if there are no frames in the given stack range. def bottom(n = 0) bind = @frames[n] Fail FrameOverflow unless bind bind end # Convenience method for Frame#bottom def Frame.bottom(n = 0) @backtrace.bottom(n) end # Convenience method for Frame#top def Frame.top(n = 0) @backtrace.top(n) end # Returns the binding context of the caller from the last frame initialized def Frame.sender eval "self", @backtrace.top end @backtrace = Frame.new set_trace_func proc{|event, file, line, id, binding, klass| @backtrace.trace_func(event, file, line, id, binding) } end end