зеркало из https://github.com/github/ruby.git
Родитель
98ef38ada4
Коммит
ac93cf4ff8
|
@ -5,13 +5,13 @@ describe "Regexp#initialize" do
|
|||
Regexp.should have_private_method(:initialize)
|
||||
end
|
||||
|
||||
ruby_version_is ""..."2.7" do
|
||||
ruby_version_is ""..."2.8" do
|
||||
it "raises a SecurityError on a Regexp literal" do
|
||||
-> { //.send(:initialize, "") }.should raise_error(SecurityError)
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is "2.7" do
|
||||
ruby_version_is "2.8" do
|
||||
it "raises a FrozenError on a Regexp literal" do
|
||||
-> { //.send(:initialize, "") }.should raise_error(FrozenError)
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ describe "Literal Regexps" do
|
|||
/Hello/.should be_kind_of(Regexp)
|
||||
end
|
||||
|
||||
ruby_version_is "2.7" do
|
||||
ruby_version_is "2.8" do
|
||||
it "is frozen" do
|
||||
/Hello/.frozen?.should == true
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче