diff --git a/ql/src/codeql_ruby/ast/Class.qll b/ql/src/codeql_ruby/ast/Class.qll index 50fdafa21b5..91829228359 100644 --- a/ql/src/codeql_ruby/ast/Class.qll +++ b/ql/src/codeql_ruby/ast/Class.qll @@ -65,11 +65,6 @@ class Class extends ExprSequence { */ final Method getAMethod() { result = this.getAnExpr() } - /** - * DEPRECATED: temporary placeholder until we have a `ConstantAccess` class. - */ - deprecated final string getSuperclassName() { result = range.getSuperclassName() } - /** * Gets the `Expr` used as the superclass in the class definition, if any. * @@ -205,14 +200,4 @@ class Module extends ExprSequence, @module { */ final Method getAMethod() { result = this.getAnExpr() } - /** - * Gets a class defined in this module. - * ```rb - * module Foo - * class Bar - * end - * end - * ``` - */ - final Class getAClass() { result = this.getAnExpr() } } diff --git a/ql/src/codeql_ruby/ast/internal/Class.qll b/ql/src/codeql_ruby/ast/internal/Class.qll index bd11fadfca5..40b9993fe47 100644 --- a/ql/src/codeql_ruby/ast/internal/Class.qll +++ b/ql/src/codeql_ruby/ast/internal/Class.qll @@ -15,11 +15,6 @@ module Class { final ScopeResolution getNameScopeResolution() { result = generated.getName() } - final string getSuperclassName() { - result = generated.getSuperclass().getChild().(Generated::Token).getValue() or - result = generated.getSuperclass().getChild().(ScopeResolution).getName() - } - final Expr getSuperclassExpr() { result = generated.getSuperclass().getChild() } } } @@ -32,8 +27,6 @@ module SingletonClass { final Expr getValue() { result = generated.getValue() } - // TODO: delete me - final AstNode getAstNodeValue() { result = generated.getValue() } } } diff --git a/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll b/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll index 930af2fe155..5207043e3c7 100644 --- a/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll +++ b/ql/src/codeql_ruby/controlflow/internal/ControlFlowGraphImpl.qll @@ -469,14 +469,9 @@ module Trees { final override AstNode getChildNode(int i, boolean rescuable) { result = this.getName() and i = 0 and rescuable = false or - if exists(this.getSuperclass()) - then ( - result = this.getSuperclass() and i = 1 and rescuable = true - or - result = this.getChild(i - 2) and rescuable = true - ) else ( - result = this.getChild(i - 1) and rescuable = true - ) + result = this.getSuperclass() and i = 1 and rescuable = true + or + result = this.getChild(i - 2) and rescuable = true } final override predicate last(AstNode last, Completion c) { this.lastInner(last, c) }