Well, I think it's OK to do that.
Seeing is believing:
# first one
a = Thread.new do
  5.times do
    f = File.new("qq.txt", "a").puts "I am a..."
    f.close if f
  end
end
b = Thread.new do
  5.times do
    f = File.new("qq.txt", "a").puts "I am b..."
    f.close if f
  end
end
a.join
b.join

# and this one
f = File.new("test.txt", "a")
a = Thread.new do
  5.times do
    f.puts "I am a..."
    sleep 1
  end
end
b = Thread.new do
  5.times do
    f.puts "I am b..."
    sleep 1
  end
end
a.join
b.join
f.close


Both program are ok. (But I am not sure myself:)