Skip to content

Commit

Permalink
fix JuliaLang#12523, bad error calling @less on REPL function
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 9, 2015
1 parent 0cd0382 commit e5ae958
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ function edit(file::AbstractString, line::Integer)
nothing
end

function edit( m::Method )
function edit(m::Method)
tv, decls, file, line = arg_decl_parts(m)
edit( string(file), line )
edit(string(file), line)
end

edit(file::AbstractString) = edit(file, 1)
edit(f) = edit(functionloc(f)...)
edit(f, t::ANY) = edit(functionloc(f,t)...)
edit(file, line::Integer) = error("could not find source file for function")

# terminal pager

Expand All @@ -67,6 +68,7 @@ end
less(file::AbstractString) = less(file, 1)
less(f) = less(functionloc(f)...)
less(f, t::ANY) = less(functionloc(f,t)...)
less(file, line::Integer) = error("could not find source file for function")

# clipboard copy and paste

Expand Down

0 comments on commit e5ae958

Please sign in to comment.