diff options
Diffstat (limited to 'spec/ruby/core/regexp/initialize_spec.rb')
-rw-r--r-- | spec/ruby/core/regexp/initialize_spec.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/ruby/core/regexp/initialize_spec.rb b/spec/ruby/core/regexp/initialize_spec.rb index a1583384af..dd57292242 100644 --- a/spec/ruby/core/regexp/initialize_spec.rb +++ b/spec/ruby/core/regexp/initialize_spec.rb @@ -5,16 +5,8 @@ describe "Regexp#initialize" do Regexp.should have_private_instance_method(:initialize) end - ruby_version_is ""..."3.0" do - it "raises a SecurityError on a Regexp literal" do - -> { //.send(:initialize, "") }.should raise_error(SecurityError) - end - end - - ruby_version_is "3.0" do - it "raises a FrozenError on a Regexp literal" do - -> { //.send(:initialize, "") }.should raise_error(FrozenError) - end + it "raises a FrozenError on a Regexp literal" do + -> { //.send(:initialize, "") }.should raise_error(FrozenError) end it "raises a TypeError on an initialized non-literal Regexp" do |