Skip to content

Commit c48b18a

Browse files
committed
[GR-27631] Move spec for unterminated unicode property Regexp.
PullRequest: truffleruby/2208
2 parents 7f4e518 + 8b7d0d0 commit c48b18a

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-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.

src/main/java/org/truffleruby/language/methods/TranslateExceptionNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public static void logUncaughtJavaException(RubyContext context, Node currentNod
7070
}
7171
}
7272

73+
@SuppressWarnings("deprecation")
7374
@Specialization
7475
protected RuntimeException translate(Throwable throwable, UnsupportedOperationBehavior unsupportedOperationBehavior,
7576
@Cached BranchProfile controlProfile,

0 commit comments

Comments
 (0)