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

ruby-changes:56221

From: Hiroshi <ko1@a...>
Date: Wed, 26 Jun 2019 09:23:58 +0900 (JST)
Subject: [ruby-changes:56221] Hiroshi SHIBATA: e478671e19 (trunk): Added version guard for backtrace printing feature of psych to ruby/spec.

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

From e478671e19e09bf50ceb52efa720a8c520d87704 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Wed, 26 Jun 2019 09:23:02 +0900
Subject: Added version guard for backtrace printing feature of psych to
 ruby/spec.


diff --git a/spec/ruby/library/yaml/to_yaml_spec.rb b/spec/ruby/library/yaml/to_yaml_spec.rb
index 8e80b02..03ec4f6 100644
--- a/spec/ruby/library/yaml/to_yaml_spec.rb
+++ b/spec/ruby/library/yaml/to_yaml_spec.rb
@@ -72,8 +72,16 @@ describe "Object#to_yaml" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/yaml/to_yaml_spec.rb#L72
     true_klass.to_yaml.should match_yaml("--- true\n")
   end
 
-  it "returns the YAML representation of a Error object" do
-    StandardError.new("foobar").to_yaml.should match_yaml("--- !ruby/exception:StandardError\nmessage: foobar\nbacktrace: \n")
+  ruby_version_is ""..."2.7" do
+    it "returns the YAML representation of a Error object" do
+      StandardError.new("foobar").to_yaml.should match_yaml("--- !ruby/exception:StandardError\nmessage: foobar\n")
+    end
+  end
+
+  ruby_version_is "2.7" do
+    it "returns the YAML representation of a Error object" do
+      StandardError.new("foobar").to_yaml.should match_yaml("--- !ruby/exception:StandardError\nmessage: foobar\nbacktrace: \n")
+    end
   end
 
   it "returns the YAML representation for Range objects" do
-- 
cgit v0.10.2


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

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