diff options
Diffstat (limited to 'value.go')
-rw-r--r-- | value.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -559,7 +559,10 @@ func (b *Builtin) Receiver() Value { return b.recv } func (b *Builtin) String() string { return toString(b) } func (b *Builtin) Type() string { return "builtin_function_or_method" } func (b *Builtin) Call(thread *Thread, args Tuple, kwargs []Tuple) (Value, error) { - return b.fn(thread, b, args, kwargs) + thread.frame = &Frame{parent: thread.frame, callable: b} + result, err := b.fn(thread, b, args, kwargs) + thread.frame = thread.frame.parent + return result, err } func (b *Builtin) Truth() Bool { return true } |