diff options
Diffstat (limited to 'spec/ruby/core/regexp/initialize_spec.rb')
-rw-r--r-- | spec/ruby/core/regexp/initialize_spec.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/ruby/core/regexp/initialize_spec.rb b/spec/ruby/core/regexp/initialize_spec.rb index 772a233e82..dd57292242 100644 --- a/spec/ruby/core/regexp/initialize_spec.rb +++ b/spec/ruby/core/regexp/initialize_spec.rb @@ -2,19 +2,11 @@ require_relative '../../spec_helper' describe "Regexp#initialize" do it "is a private method" do - Regexp.should have_private_method(:initialize) + 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 |