diff options
Diffstat (limited to 'spec/ruby/library/stringscanner/check_until_spec.rb')
-rw-r--r-- | spec/ruby/library/stringscanner/check_until_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/ruby/library/stringscanner/check_until_spec.rb b/spec/ruby/library/stringscanner/check_until_spec.rb index ad222fd76b..1d89f88a25 100644 --- a/spec/ruby/library/stringscanner/check_until_spec.rb +++ b/spec/ruby/library/stringscanner/check_until_spec.rb @@ -13,9 +13,11 @@ describe "StringScanner#check_until" do @s.check_until(/test/).should == "This is a test" end - it "raises TypeError if given a String" do - -> { - @s.check_until('T') - }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)') + ruby_version_is ""..."3.4" do + it "raises TypeError if given a String" do + -> { + @s.check_until('T') + }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)') + end end end |