Method: TkNamespace#eval

Defined in:
lib/tk/namespace.rb

#eval(cmd = Proc.new, *args) ⇒ Object

def eval(cmd = Proc.new, *args)

  #TkNamespace.eval(@fullname, cmd, *args)
  #ns_tk_call(cmd, *args)
  code_obj = code(cmd)
  ret = code_obj.call(*args)
  # uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1])
  uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1]))
  tk_tcl2ruby(ret)
end


432
433
434
435
436
437
# File 'lib/tk/namespace.rb', line 432

def eval(cmd = Proc.new, *args)
  code_obj = code(cmd)
  ret = code_obj.call(*args)
  uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1]))
  ret
end