Hi,

Can the following program produce counts that are wrong?

class Test
  attr_accessor :count
  def initialize
    @count = 0
  end
end

$test = Test.new

def my_function_called_by_many_threads
  ...
  $test.count += 1
  ...
end

Any why is the following a syntax error?

class Test
  def +=(value)
  end
end

i.e why can't I define the += operator?

regards,

Richard.