summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-06 03:02:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-06 03:02:38 +0000
commit93824a5f7390b5a548e9e1ce313ca279db8dc99b (patch)
treec6381cc29e52b3e33b18bf7ba502255106b59fdd /test/ruby/test_io.rb
parent32a75a9c1ba6d233d7c36273a7f2754f816e9408 (diff)
test_io.rb: squiggly heredoc
* test/ruby/test_io.rb (test_threaded_flush): use squiggly here document to strip leading spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 687c27c63d..149e471a8b 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2527,11 +2527,12 @@ __END__
def test_threaded_flush
bug3585 = '[ruby-core:31348]'
- src = %q{\
+ src = "#{<<~"begin;"}\n#{<<~'end;'}"
+ begin;
t = Thread.new { sleep 3 }
Thread.new {sleep 1; t.kill; p 'hi!'}
t.join
- }.gsub(/^\s+/, '')
+ end;
10.times.map do
Thread.start do
assert_in_out_err([], src) {|stdout, stderr|