summaryrefslogtreecommitdiff
path: root/spec/ruby/language/regexp
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-11-27 14:55:31 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-11-27 14:55:31 +0100
commitf02d2f82bf10351f480ea312f40cb840e2437f93 (patch)
tree0b53098bffe6dacadb09880183ebcaea06e95153 /spec/ruby/language/regexp
parentf0bfa266d70651dc295a63b026938b246693499b (diff)
Update to ruby/spec@ac878ad
Diffstat (limited to 'spec/ruby/language/regexp')
-rw-r--r--spec/ruby/language/regexp/character_classes_spec.rb6
1 files changed, 6 insertions, 0 deletions
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 == ["🦊"]