From 89ae3d49958f79d9dd8925af6bf6e73f6ed6ffa5 Mon Sep 17 00:00:00 2001 From: Ludwig Stecher Date: Sun, 5 Nov 2023 20:46:51 +0100 Subject: [PATCH] fix #102: disallow forward references in Ruby --- pomsky-lib/src/exprs/reference.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pomsky-lib/src/exprs/reference.rs b/pomsky-lib/src/exprs/reference.rs index ef8f726..062f483 100644 --- a/pomsky-lib/src/exprs/reference.rs +++ b/pomsky-lib/src/exprs/reference.rs @@ -102,7 +102,7 @@ impl<'i> RuleExt<'i> for Reference<'i> { Err(CompileErrorKind::Unsupported(direction.into(), options.flavor).at(self.span)) } - RegexFlavor::JavaScript | RegexFlavor::Python + RegexFlavor::JavaScript | RegexFlavor::Python | RegexFlavor::Ruby if direction == ReferenceDirection::Forwards => { Err(CompileErrorKind::Unsupported(Feature::ForwardReference, options.flavor)