From f02d2f82bf10351f480ea312f40cb840e2437f93 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 27 Nov 2020 14:55:31 +0100 Subject: Update to ruby/spec@ac878ad --- spec/ruby/language/regexp/character_classes_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/ruby/language/regexp') diff --git a/spec/ruby/language/regexp/character_classes_spec.rb b/spec/ruby/language/regexp/character_classes_spec.rb index 5f4221e213..0cf1e9b6f4 100644 --- a/spec/ruby/language/regexp/character_classes_spec.rb +++ b/spec/ruby/language/regexp/character_classes_spec.rb @@ -609,6 +609,12 @@ describe "Regexp with character classes" do "루비(Ruby)".match(/\p{Hangul}+/u).to_a.should == ["루비"] end + ruby_bug "#17340", ''...'3.0' do + it "raises a RegexpError for an unterminated unicode property" do + -> { Regexp.new('\p{') }.should raise_error(RegexpError) + end + end + it "supports \\X (unicode 9.0 with UTR #51 workarounds)" do # simple emoji without any fancy modifier or ZWJ /\X/.match("\u{1F98A}").to_a.should == ["🦊"] -- cgit v1.2.3