diff options
Diffstat (limited to 'spec/ruby/language/regexp_spec.rb')
-rw-r--r-- | spec/ruby/language/regexp_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/language/regexp_spec.rb b/spec/ruby/language/regexp_spec.rb index 67c7c034e9..5881afe6f1 100644 --- a/spec/ruby/language/regexp_spec.rb +++ b/spec/ruby/language/regexp_spec.rb @@ -18,6 +18,12 @@ describe "Literal Regexps" do /Hello/.should be_kind_of(Regexp) end + ruby_version_is "2.7" do + it "is frozen" do + /Hello/.frozen?.should == true + end + end + it "caches the Regexp object" do rs = [] 2.times do |i| |