23 static int IsInitialized = 0;
39 rb_eval_string_protect(cmd, &state);
42 if (state) rb_eval_string(
"puts $!");
51 VALUE ret = rb_eval_string_protect(expr, &state);
56 rb_eval_string(
"puts $!");
60 if (NIL_P(ret))
return (
TObject*)0;
65 VALUE ptr = rb_iv_get(ret,
"__rr__");
68 Data_Get_Struct(rb_iv_get(ret,
"__rr__"),
TObject, res);
77 VALUE *
v = ALLOC(VALUE);
79 *v = rb_class_new_instance (0, 0,
cTObject);
81 rb_iv_set(*v,
"__rr__", Data_Wrap_Struct (
cTObject, 0, 0, obj));
82 rb_define_variable(label, v);
static void Exec(const char *cmd)
ClassImp(TRuby) extern VALUE cTObject
void Initialize(Bool_t useTMVAStyle=kTRUE)
R__EXTERN TSystem * gSystem
virtual Int_t Exec(const char *shellcmd)
Execute a command.
static TObject * Eval(const char *expr)
Mother of all ROOT objects.
static Bool_t Bind(TObject *obj, const char *label)
static Bool_t Initialize()