Skip to content

No longer able to mutate global variable in func #676

Description

@ThumNet

Hi @xoofx

With the release of 6.5.3 we are getting some unexpected behavior in our Scriban usage.
Commit with the change: 577e2d4

{{
MyGlobalVar = 1

func mutate_global
   MyGlobalVar += 1
end

# expected 2
MyGlobalVar
}}
Image

This prints 1 while version 6.5.2 printed 2.

Is this new behavior intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions