Repository: joernio/joern (scala)

Issue:
[Bug][rubysrc2cpg] - token recognition error at: '\u'
**Describe the bug**

Error while processing the below line. 

```
sample = "AB\u0003\u0004\u0014\u0000\u0000\u0000\b\u0000\u0000\u0000!\u0000file"
```

Pull request description:
Closes #3202

Patch:
diff --git a/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/parser/RubyLexer.g4 b/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/parser/RubyLexer.g4
index ff3dc417bec2..bd968f5d8189 100644
--- a/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/parser/RubyLexer.g4
+++ b/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/parser/RubyLexer.g4
@@ -615,7 +615,7 @@ fragment SIMPLE_ESCAPE_SEQUENCE
     ;
 
 fragment DOUBLE_ESCAPED_CHARACTER
-    :   [ntrfvaebs]
+    :   [ntrfvaebsu]
     ;
 
 // --------------------------------------------------------


Test patch:
diff --git a/joern-cli/frontends/rubysrc2cpg/src/test/scala/io/joern/rubysrc2cpg/parser/RubyLexerTests.scala b/joern-cli/frontends/rubysrc2cpg/src/test/scala/io/joern/rubysrc2cpg/parser/RubyLexerTests.scala
index c42ee79a2d5d..512775f5c7b4 100644
--- a/joern-cli/frontends/rubysrc2cpg/src/test/scala/io/joern/rubysrc2cpg/parser/RubyLexerTests.scala
+++ b/joern-cli/frontends/rubysrc2cpg/src/test/scala/io/joern/rubysrc2cpg/parser/RubyLexerTests.scala
@@ -194,6 +194,16 @@ class RubyLexerTests extends AnyFlatSpec with Matchers {
     )
   }
 
+  "Double-quoted string literals containing `\\u` character sequences" should "be recognized as such" in {
+    val code = """"AB\u0003\u0004\u0014\u0000\u0000\u0000\b\u0000\u0000\u0000!\u0000file""""
+    tokenize(code) shouldBe Seq(
+      DOUBLE_QUOTED_STRING_START,
+      DOUBLE_QUOTED_STRING_CHARACTER_SEQUENCE,
+      DOUBLE_QUOTED_STRING_END,
+      EOF
+    )
+  }
+
   "Interpolated double-quoted string literal" should "be recognized as such" in {
     val code = "\"x is #{1+1}\""
     tokenize(code) shouldBe Seq(