summaryrefslogtreecommitdiff
path: root/bootstraptest/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r--bootstraptest/test_thread.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index a4d46e2f10..4040b68a27 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -257,8 +257,7 @@ assert_equal 'true', %{
}
assert_equal 'ok', %{
- open("zzz_t1.rb", "w") do |f|
- f.puts <<-END
+ File.write("zzz_t1.rb", <<-END)
begin
Thread.new { fork { GC.start } }.join
pid, status = Process.wait2
@@ -267,7 +266,6 @@ assert_equal 'ok', %{
$result = :ok
end
END
- end
require "./zzz_t1.rb"
$result
}
@@ -422,8 +420,7 @@ assert_equal 'ok', %q{
}
assert_equal 'ok', %{
- open("zzz_t2.rb", "w") do |f|
- f.puts <<-'end;' # do
+ File.write("zzz_t2.rb", <<-'end;') # do
begin
m = Thread::Mutex.new
parent = Thread.current
@@ -445,7 +442,6 @@ assert_equal 'ok', %{
$result = :ok
end
end;
- end
require "./zzz_t2.rb"
$result
}