I'm trying to evaluate Ruby (1.9) from C++.<br><br>The code looks something like this:<br><br>    rb_eval_string_protect("require 'thread'; m = Mutex.new; m.synchronize {};", &error);<br><br>The error I get is: undefined method `synchronize' for #<Mutex:0x1f8cf4><br>
<br>It looks like the mutex class (which is written in C) isn't getting loaded properly. Anybody got any ideas as to why?<div><br></div><div>The code works fine in Ruby 1.8<br><br><a href="http://pastie.org/579760">http://pastie.org/579760</a><br>
<br>--<br><a href="http://www.leadthinking.com">http://www.leadthinking.com</a> | <a href="http://socialmod.com">http://socialmod.com</a><br></div>