From e444e0146e83aba23e68e607a2bf9d92c5226882 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Thu, 5 Jan 2017 21:57:36 -0500 Subject: [PATCH] show current-world number of methods for display(::Function) --- base/replutil.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/replutil.jl b/base/replutil.jl index 7c7a4703ab334..8a7ea086c6a98 100644 --- a/base/replutil.jl +++ b/base/replutil.jl @@ -109,7 +109,7 @@ function show(io::IO, ::MIME"text/plain", f::Function) name = mt.name isself = isdefined(ft.name.module, name) && ft == typeof(getfield(ft.name.module, name)) - n = length(mt) + n = length(methods(f)) m = n==1 ? "method" : "methods" ns = isself ? string(name) : string("(::", name, ")") what = startswith(ns, '@') ? "macro" : "generic function"