1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix for old MRI versions

This commit is contained in:
Koichi Sasada 2019-12-11 14:00:32 +09:00
parent fe8caf0ab9
commit 6025783a3b

View file

@ -1,7 +1,8 @@
require_relative '../fixtures/classes'
describe :thread_to_s, shared: true do
sep = ruby_version_is("2.7") ? " " : "@"
sep = " "
ruby_version_is(''..."2.7"){ sep = '@' }
it "returns a description including file and line number" do
Thread.new { "hello" }.send(@method).should =~ /^#<Thread:([^ ]*?)#{sep}#{Regexp.escape __FILE__}:#{__LINE__ } \w+>$/