C
Clark Snowdall
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
But if I do THIS:
require 'rubygems'
require 'fastthread'
class MutexTest
def initialize
@lock = Mutex.new
end
end
test = MutexTest.new
It works fine. Am I missing something? I've been working out of the
pickax book and it mentions nothing of this. Side note: ruby version
1.8.6, gem version 1.1.1, running on Mac OS X 1.5.2 (with Apples builtin
ruby).
Any ideas?
Thanks for the help,
Snowdall
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
But if I do THIS:
require 'rubygems'
require 'fastthread'
class MutexTest
def initialize
@lock = Mutex.new
end
end
test = MutexTest.new
It works fine. Am I missing something? I've been working out of the
pickax book and it mentions nothing of this. Side note: ruby version
1.8.6, gem version 1.1.1, running on Mac OS X 1.5.2 (with Apples builtin
ruby).
Any ideas?
Thanks for the help,
Snowdall