hi!
i'm working on a c++ wrapper class for ruby objects.
for debugging purposes i'd be fine to call the 'inspect'
method for these objects.
sort of
rb_funcall(value,rb_intern("inspect"),0);
works well for numbers,strings,classes,
but fails for arrays & hashes.
on the other hand
rb_funcall(value,rb_intern("to_s"),0);
works for all types, but the result is rather less nice...
as i see it, the reason for this failure is 'rb_ensure'
encountering 'prot_tag' set still to zero.
(seems 'rb_ensure' assumes to be called inside a
PUSH_TAG/POP_TAG, as if called by 'rb_eval')
so how can i cleanly call 'inspect' on arrays/hashes
without fiddling around with 'eval'?
cioa, andi