From: Graham Menhennitt Date: 2012-11-21T15:38:26+09:00 Subject: "undefined method `synchronize' for #" from embedded Ruby program I'm writing a C++ program (on Centos 5 Linux) that embeds a Ruby 1.9.3 p327 interpreter. It mostly works, but I'm getting a strange error from a script called by the program. When run from the command line (i.e. not embedded), the script works correctly. The error is: undefined method `synchronize' for # If I search back over this list's archives, I can see a few other people with the same problem (but no solution). I've narrowed it down to the following test program: #include int main(int argc, char *argv[]) { RUBY_INIT_STACK; ruby_init(); ruby_init_loadpath(); rb_eval_string("$mutex = Mutex.new"); rb_eval_string("$mutex.synchronize(){}"); return 0; } Does anybody have any clues, please? Thanks, Graham