Skip to content

Commit

Permalink
Fix help for operators starting with a dot
Browse files Browse the repository at this point in the history
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 5671381)
Ref: #9109
  • Loading branch information
mbauman authored and ivarne committed Dec 4, 2014
1 parent eb95148 commit 44347a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/help.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"(?<!\.)\."))))
if mf === obj
append!(alldesc, FUNCTION_DICT[mfname])
found = true
Expand Down

0 comments on commit 44347a9

Please sign in to comment.