summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/shared/to_s.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-03-28 17:47:04 +0200
committerBenoit Daloze <eregontp@gmail.com>2022-03-28 17:47:04 +0200
commit8db4f25bf4327f169902afd9ea8f4b03b65656f0 (patch)
treead61b99fb2d5ebfe9c07de8c2b5885e80d20b8e1 /spec/ruby/core/hash/shared/to_s.rb
parentae650f0372e10cea4d695769b1fcdc23a76fdf17 (diff)
Update to ruby/spec@aaf998f
Diffstat (limited to 'spec/ruby/core/hash/shared/to_s.rb')
-rw-r--r--spec/ruby/core/hash/shared/to_s.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/ruby/core/hash/shared/to_s.rb b/spec/ruby/core/hash/shared/to_s.rb
index b0e3705d01..c74537aed4 100644
--- a/spec/ruby/core/hash/shared/to_s.rb
+++ b/spec/ruby/core/hash/shared/to_s.rb
@@ -2,7 +2,6 @@ require_relative '../../../spec_helper'
require_relative '../fixtures/classes'
describe :hash_to_s, shared: true do
-
it "returns a string representation with same order as each()" do
h = { a: [1, 2], b: -2, d: -6, nil => nil }
@@ -95,4 +94,8 @@ describe :hash_to_s, shared: true do
{a: utf_16be}.send(@method).should == '{:a=>"utf_16be \u3042"}'
end
+
+ it "works for keys and values whose #inspect return a frozen String" do
+ { true => false }.to_s.should == "{true=>false}"
+ end
end