[前][次][番号順一覧][スレッド一覧]

ruby-changes:59182

From: Koichi <ko1@a...>
Date: Wed, 11 Dec 2019 15:16:35 +0900 (JST)
Subject: [ruby-changes:59182] 6025783a3b (master): fix for old MRI versions

https://git.ruby-lang.org/ruby.git/commit/?id=6025783a3b

From 6025783a3b0b37517728c635250669449bb21a53 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Wed, 11 Dec 2019 14:00:32 +0900
Subject: fix for old MRI versions


diff --git a/spec/ruby/core/thread/shared/to_s.rb b/spec/ruby/core/thread/shared/to_s.rb
index 0c4e3c0..c3718ce 100644
--- a/spec/ruby/core/thread/shared/to_s.rb
+++ b/spec/ruby/core/thread/shared/to_s.rb
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/shared/to_s.rb#L1
 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+>$/
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]