Skip to content

Commit ed09c73

Browse files
committed
fix printing of frames on 1.3.
These now include some extra locationinfo that we now filter out.
1 parent c8ffd42 commit ed09c73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function framecode_lines(src::CodeInfo)
291291
buf = IOBuffer()
292292
show(buf, src)
293293
code = filter!(split(String(take!(buf)), '\n')) do line
294-
!(line == "CodeInfo(" || line == ")" || isempty(line))
294+
!(line == "CodeInfo(" || line == ")" || isempty(line) || occursin("within `", line))
295295
end
296296
code .= replace.(code, Ref(r"\$\(QuoteNode\((.+?)\)\)" => s"\1"))
297297
return code
@@ -371,7 +371,7 @@ Evaluate `code` in the context of `frame`, updating any local variables
371371
(including type parameters) that are reassigned in `code`, however, new local variables
372372
cannot be introduced.
373373
374-
```jldoctest; setup=(using JuliaInterpreter; empty!(JuliaInterpreter.junk))
374+
```jldoctest
375375
julia> foo(x, y) = x + y;
376376
377377
julia> frame = JuliaInterpreter.enter_call(foo, 1, 3);
@@ -383,7 +383,7 @@ julia> JuliaInterpreter.eval_code(frame, "x = 5");
383383
384384
julia> JuliaInterpreter.finish_and_return!(frame)
385385
8
386-
````
386+
```
387387
388388
When variables are captured in closures (and thus gets wrapped in a `Core.Box`)
389389
they will be automatically unwrapped and rewrapped upon evaluating them:

0 commit comments

Comments
 (0)