From 44347a976833fae2df6e284c6ffbfc943cdec94c Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Sat, 22 Nov 2014 12:17:41 -0500 Subject: [PATCH] Fix help for operators starting with a dot This fixes #8903 and supersedes #8922 (cc @hayd). Basically, when you pass a function to the help system (instead of just its name), the system can go through all the modules and only returns those methods that actually extend the same function. The way it does this, however, is a little hacky... using string concatenation to combine the function name with the module names, and then splitting it back apart again on dots to get the functions within each module. This simply improves the splitting logic with a regex to handle the leading dot. (cherry picked from commit 56713813556d207c44f3495ad3120cf671f4a929) Ref: #9109 --- base/help.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/help.jl b/base/help.jl index 4eb75affb79a7..084ad605d937d 100644 --- a/base/help.jl +++ b/base/help.jl @@ -99,7 +99,7 @@ function help(io::IO, fname::String, obj=0) for mod in allmods mfname = isempty(mod) ? fname : mod * "." * fname if isgeneric(obj) - mf = eval(func_expr_from_symbols(map(symbol, split(mfname, ".")))) + mf = eval(func_expr_from_symbols(map(symbol, split(mfname, r"(?