Top Level Namespace

Defined Under Namespace

Classes: Thread

Instance Method Summary collapse

Instance Method Details

#find_line(line) ⇒ Object

:nodoc



169
170
171
172
173
# File 'lib/iseq_extra.rb', line 169

def find_line(line) # :nodoc
  tf = RubyVM::Frame.current
  puts "find_line has lines: #{tf.iseq.lines}"
  p tf.iseq.find_iseq_with_line(line)
end

#iseqObject

FIXME puts iseq.format_args



147
# File 'lib/iseq_extra.rb', line 147

puts iseq.disassemble

#show_typeObject

:nodoc:



153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/iseq_extra.rb', line 153

def show_type # :nodoc:
  tf = RubyVM::Frame.current
  while tf do
    is = tf.iseq
    if is
      ist = tf.iseq.type
      isn = RubyVM::InstructionSequence::TYPE2STR[ist]
      puts "instruction sequence #{is.inspect} has type #{isn} (#{ist})."
    end
    tf = tf.prev
  end
end