1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added version guard for backtrace printing feature of psych to ruby/spec.

This commit is contained in:
Hiroshi SHIBATA 2019-06-26 09:23:02 +09:00
parent cfa1a18431
commit e478671e19
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -72,8 +72,16 @@ describe "Object#to_yaml" do
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