Skip to content

Commit

Permalink
fix methodswith performance
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolewski committed Apr 29, 2015
1 parent 39d640e commit dea3d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function methodswith(t::Type, m::Module, showparents::Bool=false)
meths = Method[]
for nm in names(m)
if isdefined(m, nm)
f = eval(m, nm)
f = getfield(m, nm)
if isa(f, Function)
methodswith(t, f, showparents, meths)
end
Expand All @@ -319,7 +319,7 @@ function methodswith(t::Type, showparents::Bool=false)
# find modules in Main
for nm in names(mainmod)
if isdefined(mainmod,nm)
mod = eval(mainmod, nm)
mod = getfield(mainmod, nm)
if isa(mod, Module)
append!(meths, methodswith(t, mod, showparents))
end
Expand Down

0 comments on commit dea3d0e

Please sign in to comment.