Skip to content

Commit 8b7d0d0

Browse files
committed
Add spec for unterminated unicode property Regexp
1 parent 799dd39 commit 8b7d0d0

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

spec/ruby/language/regexp/character_classes_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@
609609
"루비(Ruby)".match(/\p{Hangul}+/u).to_a.should == ["루비"]
610610
end
611611

612+
ruby_bug "#17340", ''...'3.0' do
613+
it "raises a RegexpError for an unterminated unicode property" do
614+
-> { Regexp.new('\p{') }.should raise_error(RegexpError)
615+
end
616+
end
617+
612618
it "supports \\X (unicode 9.0 with UTR #51 workarounds)" do
613619
# simple emoji without any fancy modifier or ZWJ
614620
/\X/.match("\u{1F98A}").to_a.should == ["🦊"]

spec/truffle/regexp_spec.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)