diff options
author | Benoit Daloze <eregontp@gmail.com> | 2023-01-05 19:05:29 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2023-01-05 19:05:29 +0100 |
commit | bbf54ec334fe2edd7669a944d88d17efde49a412 (patch) | |
tree | 2941c7b711319b295aa3664b6a2b984e70a523b7 /spec/ruby/language | |
parent | cd5e6cc0ea48353c88d921b885b552dc76da255c (diff) | |
download | ruby-bbf54ec334fe2edd7669a944d88d17efde49a412.tar.gz |
Update to ruby/spec@9d69b95
Diffstat (limited to 'spec/ruby/language')
-rw-r--r-- | spec/ruby/language/case_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/language/regexp/character_classes_spec.rb | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/language/case_spec.rb b/spec/ruby/language/case_spec.rb index bf06803764..915c032a71 100644 --- a/spec/ruby/language/case_spec.rb +++ b/spec/ruby/language/case_spec.rb @@ -103,7 +103,7 @@ describe "The 'case'-construct" do $1.should == "42" end - it "tests with a regexp interpolated within another regexp" do + it "tests with a string interpolated in a regexp" do digits = '\d+' case "foo44" when /oo(#{digits})/ @@ -116,7 +116,7 @@ describe "The 'case'-construct" do $1.should == "44" end - it "tests with a string interpolated in a regexp" do + it "tests with a regexp interpolated within another regexp" do digits_regexp = /\d+/ case "foo43" when /oo(#{digits_regexp})/ diff --git a/spec/ruby/language/regexp/character_classes_spec.rb b/spec/ruby/language/regexp/character_classes_spec.rb index 0cf1e9b6f4..12a51178b2 100644 --- a/spec/ruby/language/regexp/character_classes_spec.rb +++ b/spec/ruby/language/regexp/character_classes_spec.rb @@ -609,6 +609,11 @@ describe "Regexp with character classes" do "루비(Ruby)".match(/\p{Hangul}+/u).to_a.should == ["루비"] end + it "supports negated property condition" do + "a".match(/\P{L}/).should be_nil + "1".match(/\P{N}/).should be_nil + end + ruby_bug "#17340", ''...'3.0' do it "raises a RegexpError for an unterminated unicode property" do -> { Regexp.new('\p{') }.should raise_error(RegexpError) |