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

ruby-changes:69896

From: nagachika <ko1@a...>
Date: Wed, 24 Nov 2021 19:22:19 +0900 (JST)
Subject: [ruby-changes:69896] 3ac499555d (ruby_3_0): merge revision(s) f367b4ffe739453e87e55f955138b0ce662942b7,31a757a4426f1ac8c479313e01542940386fc2fe,837cbea64b74d464bfbfb10e6c81a8f92c6eee71:

https://git.ruby-lang.org/ruby.git/commit/?id=3ac499555d

From 3ac499555d9f0c5dd94f636a05c5feb4983656fb Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Wed, 24 Nov 2021 19:21:54 +0900
Subject: merge revision(s)
 f367b4ffe739453e87e55f955138b0ce662942b7,31a757a4426f1ac8c479313e01542940386fc2fe,837cbea64b74d464bfbfb10e6c81a8f92c6eee71:

	assert_equal accepts an expected value as the first argument

	---
	 test/psych/test_coder.rb | 30 +++++++++++++++---------------
	 1 file changed, 15 insertions(+), 15 deletions(-)

	Make the test pass with the old libyaml

	I have no idea what result is right, but it fails with libyaml 0.1.7
	(bundled with Ubuntu 18.04) anyway.
	---
	 test/psych/test_coder.rb | 6 +++---
	 1 file changed, 3 insertions(+), 3 deletions(-)

	test/psych/test_coder.rb: Suppress non-parenthesis warnings

	http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20210518T093002Z.log.html.gz
	```
	/home/chkbuild/chkbuild/tmp/build/20210518T093002Z/ruby/test/psych/test_coder.rb:277: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
	```
	---
	 test/psych/test_coder.rb | 6 +++---
	 1 file changed, 3 insertions(+), 3 deletions(-)
---
 test/psych/test_coder.rb | 30 +++++++++++++++---------------
 version.h                |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb
index 2cf3fe26ef6..b2be0a41096 100644
--- a/test/psych/test_coder.rb
+++ b/test/psych/test_coder.rb
@@ -216,7 +216,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L216
 
     def test_coder_style_map_default
       foo = Psych.dump a: 1, b: 2
-      assert_equal foo, "---\n:a: 1\n:b: 2\n"
+      assert_equal "---\n:a: 1\n:b: 2\n", foo
     end
 
     def test_coder_style_map_any
@@ -224,7 +224,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L224
         map: {a: 1, b: 2},
         style: Psych::Nodes::Mapping::ANY,
         tag: nil
-      assert_equal foo, "---\n:a: 1\n:b: 2\n"
+      assert_equal "---\n:a: 1\n:b: 2\n", foo
     end
 
     def test_coder_style_map_block
@@ -232,7 +232,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L232
         map: {a: 1, b: 2},
         style: Psych::Nodes::Mapping::BLOCK,
         tag: nil
-      assert_equal foo, "---\n:a: 1\n:b: 2\n"
+      assert_equal "---\n:a: 1\n:b: 2\n", foo
     end
 
     def test_coder_style_map_flow
@@ -240,12 +240,12 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L240
         map: { a: 1, b: 2 },
         style: Psych::Nodes::Mapping::FLOW,
         tag: nil
-      assert_equal foo, "--- {! ':a': 1, ! ':b': 2}\n"
+      assert_equal "--- {! ':a': 1, ! ':b': 2}\n", foo
     end
 
     def test_coder_style_seq_default
       foo = Psych.dump [ 1, 2, 3 ]
-      assert_equal foo, "---\n- 1\n- 2\n- 3\n"
+      assert_equal "---\n- 1\n- 2\n- 3\n", foo
     end
 
     def test_coder_style_seq_any
@@ -253,7 +253,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L253
         seq: [ 1, 2, 3 ],
         style: Psych::Nodes::Sequence::ANY,
         tag: nil
-      assert_equal foo, "---\n- 1\n- 2\n- 3\n"
+      assert_equal "---\n- 1\n- 2\n- 3\n", foo
     end
 
     def test_coder_style_seq_block
@@ -261,7 +261,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L261
         seq: [ 1, 2, 3 ],
         style: Psych::Nodes::Sequence::BLOCK,
         tag: nil
-      assert_equal foo, "---\n- 1\n- 2\n- 3\n"
+      assert_equal "---\n- 1\n- 2\n- 3\n", foo
     end
 
     def test_coder_style_seq_flow
@@ -269,12 +269,12 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L269
         seq: [ 1, 2, 3 ],
         style: Psych::Nodes::Sequence::FLOW,
         tag: nil
-      assert_equal foo, "--- [1, 2, 3]\n"
+      assert_equal "--- [1, 2, 3]\n", foo
     end
 
     def test_coder_style_scalar_default
       foo = Psych.dump 'some scalar'
-      assert_equal foo, "--- some scalar\n"
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_any
@@ -282,7 +282,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L282
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::ANY,
         tag: nil
-      assert_equal foo, "--- some scalar\n"
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_plain
@@ -290,7 +290,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L290
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::PLAIN,
         tag: nil
-      assert_equal foo, "--- some scalar\n"
+      assert_match(/\A--- some scalar\n(?:\.\.\.\n)?\z/, foo)
     end
 
     def test_coder_style_scalar_single_quoted
@@ -298,7 +298,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L298
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::SINGLE_QUOTED,
         tag: nil
-      assert_equal foo, "--- ! 'some scalar'\n"
+      assert_equal "--- ! 'some scalar'\n", foo
     end
 
     def test_coder_style_scalar_double_quoted
@@ -306,7 +306,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L306
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::DOUBLE_QUOTED,
         tag: nil
-      assert_equal foo, %Q'--- ! "some scalar"\n'
+      assert_equal %Q'--- ! "some scalar"\n', foo
     end
 
     def test_coder_style_scalar_literal
@@ -314,7 +314,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L314
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::LITERAL,
         tag: nil
-      assert_equal foo, "--- ! |-\n  some scalar\n"
+      assert_equal "--- ! |-\n  some scalar\n", foo
     end
 
     def test_coder_style_scalar_folded
@@ -322,7 +322,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_coder.rb#L322
         scalar: 'some scalar',
         style: Psych::Nodes::Scalar::FOLDED,
         tag: nil
-      assert_equal foo, "--- ! >-\n  some scalar\n"
+      assert_equal "--- ! >-\n  some scalar\n", foo
     end
   end
 end
diff --git a/version.h b/version.h
index 99dfe088e7f..1266c847c00 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 3
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 154
+#define RUBY_PATCHLEVEL 155
 
 #define RUBY_RELEASE_YEAR 2021
 #define RUBY_RELEASE_MONTH 11
-- 
cgit v1.2.1


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

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