From: 7stud -- Date: 2008-05-19T12:18:38+09:00 Subject: Re: Mutex question Clark Snowdall wrote: > Ok ... I'm not sure what the story is with this (perhaps I'm just > clueless). But, when I do this: > > class MutexTest > def initialize > @lock = Mutex.new > end > end > > test = MutexTest.new > > > I get this: > > mutex_test.rb:3:in `initialize': uninitialized constant MutexTest::Mutex > (NameError) > from mutex_test.rb:7:in `new' > from mutex_test.rb:7 > m = Mutex.new puts 'hello' --output:-- 1: uninitialized constant Mutex (NameError) ------------ require 'thread' m = Mutex.new puts 'hello' --output:-- hello See pickaxe2, p 696. -- Posted via http://www.ruby-forum.com/.