Skip to content

Commit a1b556f

Browse files
committed
Loosen regexp for Lambda to replace variable parts
1 parent 113d65c commit a1b556f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/truffleruby/debug/TruffleASTPrinter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,10 @@ private static void printAttributes(List<Pair<String, Object>> attributes, Strin
223223
string = string.replaceAll("(?<!^|@)@[0-9a-f]+", "@...");
224224

225225
// remove variable String representation of an instance of MethodTranslator,
226-
// e.g. "org.truffleruby.parser.MethodTranslator$$Lambda$839/0x00000008012ec000@...)"
226+
// e.g. "org.truffleruby.parser.MethodTranslator$$Lambda$839/0x00000008012ec000@..."
227+
// or "org.truffleruby.parser.MethodTranslator$$Lambda/0x00000008012d5c70@..."
227228
string = string.replaceAll(
228-
"\\$\\$Lambda\\$\\d+/0x[0-9a-f]+@",
229+
"\\$\\$Lambda[^@]+@",
229230
Matcher.quoteReplacement("$$Lambda$.../0x...@"));
230231

231232
// remove column information for SourceSection - it's wrong in the current implementation

0 commit comments

Comments
 (0)