diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/thread/shared/to_s.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/ruby/core/thread/shared/to_s.rb b/spec/ruby/core/thread/shared/to_s.rb index 0c4e3c0b96..c3718cef88 100644 --- a/spec/ruby/core/thread/shared/to_s.rb +++ b/spec/ruby/core/thread/shared/to_s.rb @@ -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+>$/ |