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

ruby-changes:71405

From: Martin <ko1@a...>
Date: Mon, 14 Mar 2022 08:40:50 +0900 (JST)
Subject: [ruby-changes:71405] 267f0089d3 (master): clarify meaning of version guards for Unicode version specs [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=267f0089d3

From 267f0089d3255c1f06ab5adf9f6c77b1ccfd2771 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20D=C3=BCrst?= <duerst@i...>
Date: Mon, 14 Mar 2022 08:37:53 +0900
Subject: clarify meaning of version guards for Unicode version specs [ci skip]

---
 spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb | 13 +++++++------
 spec/ruby/library/rbconfig/unicode_version_spec.rb       | 13 +++++++------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb b/spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb
index c424ba5033..9b64ea6de2 100644
--- a/spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb
+++ b/spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb
@@ -20,14 +20,15 @@ describe "RbConfig::CONFIG['UNICODE_EMOJI_VERSION']" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb#L20
     end
   end
 
- ruby_version_is "3.1"..."3.2" do
-   it "is 13.1 for Ruby 3.1" do
-     RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "13.1"
-   end
- end
+  ruby_version_is "3.1"..."3.2" do
+    it "is 13.1 for Ruby 3.1" do
+      RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "13.1"
+    end
+  end
 
+  # Caution: ruby_version_is means is_or_later
   ruby_version_is "3.2" do
-    it "is 14.0 for Ruby 3.2" do
+    it "is 14.0 for Ruby 3.2 or later" do
       RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "14.0"
     end
   end
diff --git a/spec/ruby/library/rbconfig/unicode_version_spec.rb b/spec/ruby/library/rbconfig/unicode_version_spec.rb
index 6424986a97..312d3c92d4 100644
--- a/spec/ruby/library/rbconfig/unicode_version_spec.rb
+++ b/spec/ruby/library/rbconfig/unicode_version_spec.rb
@@ -20,14 +20,15 @@ describe "RbConfig::CONFIG['UNICODE_VERSION']" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/rbconfig/unicode_version_spec.rb#L20
     end
   end
 
- ruby_version_is "3.1"..."3.2" do
-   it "is 13.0.0 for Ruby 3.1" do
-     RbConfig::CONFIG['UNICODE_VERSION'].should == "13.0.0"
-   end
- end
+  ruby_version_is "3.1"..."3.2" do
+    it "is 13.0.0 for Ruby 3.1" do
+      RbConfig::CONFIG['UNICODE_VERSION'].should == "13.0.0"
+    end
+  end
 
+  # Caution: ruby_version_is means is_or_later
   ruby_version_is "3.2" do
-    it "is 14.0.0 for Ruby 3.2" do
+    it "is 14.0.0 for Ruby 3.2 or later" do
       RbConfig::CONFIG['UNICODE_VERSION'].should == "14.0.0"
     end
   end
-- 
cgit v1.2.1


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

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