[LRUG] Ruby 1.9 problem - mutex lib not loading properly

Alex MacCaw maccman at gmail.com
Tue Aug 11 03:06:42 PDT 2009


I'm trying to evaluate Ruby (1.9) from C++.

The code looks something like this:

   rb_eval_string_protect("require 'thread'; m = Mutex.new; m.synchronize
{};", &error);

The error I get is: undefined method `synchronize' for #<Mutex:0x1f8cf4>

It looks like the mutex class (which is written in C) isn't getting loaded
properly. Anybody got any ideas as to why?
The code works fine in Ruby 1.8

http://pastie.org/579760

--
http://www.leadthinking.com | http://socialmod.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20090811/f1b2f7ce/attachment.html>


More information about the Chat mailing list