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:
parent
fe8caf0ab9
commit
6025783a3b
1 changed files with 2 additions and 1 deletions
|
@ -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+>$/
|
||||
|
|
Loading…
Reference in a new issue