# Embedded ruby question

**URL:** <https://www.ruby-forum.com/t/embedded-ruby-question/66117>\
**Category:** Ruby\
**Created:** [August 23, 2006, 1:29pm UTC](https://www.ruby-forum.com/t/embedded-ruby-question/66117 "2006-08-23T13:29:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![photon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b5a626/32.png) [@photon](https://www.ruby-forum.com/u/photon)\
**Post date:** [August 23, 2006, 1:29pm UTC](https://www.ruby-forum.com/t/embedded-ruby-question/66117/1 "2006-08-23T13:29:52Z")

</div>

I am developing an application in which Ruby is embedded in a C++  
program that defines some native classes and methods and then calls  
ruby\_exec to run some script. The script calls the C++ methods and all  
works well.

Now I want to be able to examine ruby expressions inside these C++  
methods. I’m trying to call rb\_eval\_string but that only kills my  
script run.  
Is there a way to do this?

btw, the expressions are simple variable queries, but not necessarily  
ones that fall into one of the rb\_?var\_get methods (i.e. local function  
vars)
