Module: RBTrace

Defined in:
lib/rbtrace.rb,
ext/rbtrace.c

Defined Under Namespace

Modules: OUT

Class Method Summary collapse

Class Method Details

.eval_and_inspect(code) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/rbtrace.rb', line 5

def eval_and_inspect(code)
  t = Thread.new do
    Thread.current.name = '__RBTrace__'
    Thread.current[:output] = eval_context.eval(code).inspect
  end
  t.join
  t[:output]
end