1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update version guard

fix up 98ef38ada4
This commit is contained in:
Kazuhiro NISHIYAMA 2020-01-15 10:50:53 +09:00
parent 98ef38ada4
commit ac93cf4ff8
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A
2 changed files with 3 additions and 3 deletions

View file

@ -5,13 +5,13 @@ describe "Regexp#initialize" do
Regexp.should have_private_method(:initialize) Regexp.should have_private_method(:initialize)
end end
ruby_version_is ""..."2.7" do ruby_version_is ""..."2.8" do
it "raises a SecurityError on a Regexp literal" do it "raises a SecurityError on a Regexp literal" do
-> { //.send(:initialize, "") }.should raise_error(SecurityError) -> { //.send(:initialize, "") }.should raise_error(SecurityError)
end end
end end
ruby_version_is "2.7" do ruby_version_is "2.8" do
it "raises a FrozenError on a Regexp literal" do it "raises a FrozenError on a Regexp literal" do
-> { //.send(:initialize, "") }.should raise_error(FrozenError) -> { //.send(:initialize, "") }.should raise_error(FrozenError)
end end

View file

@ -18,7 +18,7 @@ describe "Literal Regexps" do
/Hello/.should be_kind_of(Regexp) /Hello/.should be_kind_of(Regexp)
end end
ruby_version_is "2.7" do ruby_version_is "2.8" do
it "is frozen" do it "is frozen" do
/Hello/.frozen?.should == true /Hello/.frozen?.should == true
end end