aboutsummaryrefslogtreecommitdiffstats
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
commitd10eee1e2bf108ff8918f989cb81a7df5e9019c1 (patch)
treec6381cc29e52b3e33b18bf7ba502255106b59fdd
parentc17f86c8a62fe14237bcc20e1cc4a539b35f7299 (diff)
downloadruby-d10eee1e2bf108ff8918f989cb81a7df5e9019c1.tar.gz
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
-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|