We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cfd5e commit b8a7988Copy full SHA for b8a7988
1 file changed
test/ruby/test_string.rb
@@ -3443,9 +3443,11 @@ def test_uminus_no_freeze_not_bare
3443
3444
def test_uminus_no_embed_gc
3445
pad = "a"*2048
3446
- ("aa".."zz").each do |c|
3447
- fstr = -(c + pad).freeze
3448
- File.open(IO::NULL, "w").write(fstr)
+ File.open(IO::NULL, "w") do |dev_null|
+ ("aa".."zz").each do |c|
+ fstr = -(c + pad).freeze
3449
+ dev_null.write(fstr)
3450
+ end
3451
end
3452
GC.start
3453
0 commit comments