diff options
Diffstat (limited to 'spec/ruby/core/false/to_s_spec.rb')
-rw-r--r-- | spec/ruby/core/false/to_s_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/false/to_s_spec.rb b/spec/ruby/core/false/to_s_spec.rb index 40853da88b..c996d87000 100644 --- a/spec/ruby/core/false/to_s_spec.rb +++ b/spec/ruby/core/false/to_s_spec.rb @@ -4,4 +4,14 @@ describe "FalseClass#to_s" do it "returns the string 'false'" do false.to_s.should == "false" end + + ruby_version_is "2.7" do + it "returns a frozen string" do + false.to_s.frozen?.should == true + end + + it "always returns the same string" do + false.to_s.should equal(false.to_s) + end + end end |