File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
ruby/ql/lib/codeql/ruby/ast/internal Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,14 @@ private module Cached {
137
137
}
138
138
139
139
cached
140
- Method lookupMethod ( Module m , string name ) { TMethod ( result ) = lookupMethodOrConst ( m , name ) }
140
+ Method lookupMethod ( Module m , string name ) {
141
+ // The syntax_suggest library redefines Kernel.require/require_relative.
142
+ // Somehow this causes performance issues on ruby/ruby. As a workaround
143
+ // we exclude 'require' and 'require_relative'.
144
+ // TODO: find the actual cause of the slowdown and fix things properly.
145
+ not name = [ "require" , "require_relative" ] and
146
+ TMethod ( result ) = lookupMethodOrConst ( m , name )
147
+ }
141
148
142
149
cached
143
150
Expr lookupConst ( Module m , string name ) {
You can’t perform that action at this time.
0 commit comments