X7ROOT File Manager
Current Path:
/opt/alt/ruby19/lib64/ruby/1.9.1/irb
opt
/
alt
/
ruby19
/
lib64
/
ruby
/
1.9.1
/
irb
/
ðŸ“
..
ðŸ“
cmd
📄
completion.rb
(5.86 KB)
📄
context.rb
(6.91 KB)
ðŸ“
ext
📄
extend-command.rb
(7 KB)
📄
frame.rb
(1.21 KB)
📄
help.rb
(549 B)
📄
init.rb
(6.96 KB)
📄
input-method.rb
(2.5 KB)
📄
inspector.rb
(2.19 KB)
ðŸ“
lc
📄
locale.rb
(4.42 KB)
📄
magic-file.rb
(893 B)
📄
notifier.rb
(2.64 KB)
📄
output-method.rb
(1.31 KB)
📄
ruby-lex.rb
(22.12 KB)
📄
ruby-token.rb
(7.27 KB)
📄
slex.rb
(5.93 KB)
📄
src_encoding.rb
(90 B)
📄
version.rb
(241 B)
📄
workspace.rb
(2.54 KB)
📄
ws-for-case-2.rb
(195 B)
📄
xmp.rb
(1.76 KB)
Editing: frame.rb
# # frame.rb - # $Release Version: 0.9$ # $Revision: 25189 $ # 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" INIT_STACK_TIMES = 3 CALL_STACK_OFFSET = 3 def initialize @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES end def trace_func(event, file, line, id, binding) case event when 'call', 'class' @frames.push binding when 'return', 'end' @frames.pop end end def top(n = 0) bind = @frames[-(n + CALL_STACK_OFFSET)] Fail FrameUnderflow unless bind bind end def bottom(n = 0) bind = @frames[n] Fail FrameOverflow unless bind bind end # singleton functions def Frame.bottom(n = 0) @backtrace.bottom(n) end def Frame.top(n = 0) @backtrace.top(n) end 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
Upload File
Create Folder