From cd74792b7aec1669d8f6ce1b1b6d7534677f4284 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Wed, 29 Nov 2023 14:58:33 +0100 Subject: [PATCH] rubysrc ast creation: fix double handled 'MemberAccess' case (#3867) --- .../joern/rubysrc2cpg/astcreation/AstForStatementsCreator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joern-cli/frontends/rubysrc2cpg/src/main/scala/io/joern/rubysrc2cpg/astcreation/AstForStatementsCreator.scala b/joern-cli/frontends/rubysrc2cpg/src/main/scala/io/joern/rubysrc2cpg/astcreation/AstForStatementsCreator.scala index 389b0dc392cc..07a2b094d80b 100644 --- a/joern-cli/frontends/rubysrc2cpg/src/main/scala/io/joern/rubysrc2cpg/astcreation/AstForStatementsCreator.scala +++ b/joern-cli/frontends/rubysrc2cpg/src/main/scala/io/joern/rubysrc2cpg/astcreation/AstForStatementsCreator.scala @@ -190,7 +190,7 @@ trait AstForStatementsCreator(implicit withSchemaValidation: ValidationMode) { t private def astsForImplicitReturnStatement(node: RubyNode): List[Ast] = { node match case _: (ArrayLiteral | HashLiteral | StaticLiteral | BinaryExpression | UnaryExpression | SimpleIdentifier | - IfExpression | SimpleCall | MemberAccess) => + IfExpression | SimpleCall) => astForReturnStatement(ReturnExpression(List(node))(node.span)) :: Nil case node: SingleAssignment => astForSingleAssignment(node) :: List(astForReturnStatement(ReturnExpression(List(node.lhs))(node.span)))