Skip to content

Commit dea3d0e

Browse files
committed
fix methodswith performance
1 parent 39d640e commit dea3d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/interactiveutil.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function methodswith(t::Type, m::Module, showparents::Bool=false)
304304
meths = Method[]
305305
for nm in names(m)
306306
if isdefined(m, nm)
307-
f = eval(m, nm)
307+
f = getfield(m, nm)
308308
if isa(f, Function)
309309
methodswith(t, f, showparents, meths)
310310
end
@@ -319,7 +319,7 @@ function methodswith(t::Type, showparents::Bool=false)
319319
# find modules in Main
320320
for nm in names(mainmod)
321321
if isdefined(mainmod,nm)
322-
mod = eval(mainmod, nm)
322+
mod = getfield(mainmod, nm)
323323
if isa(mod, Module)
324324
append!(meths, methodswith(t, mod, showparents))
325325
end

0 commit comments

Comments
 (0)