Skip to content

MatchData#end returns invalid offset when called within evalAsync #555

@palkan

Description

@palkan

Stackblitz reproduction: https://stackblitz.com/edit/ruby-wasm-demo-78s71k?file=index.html

MatchData#end returns incorrect match offset when used in async context:

vm.eval(/(т)(е)(с)/.match('тест').end(0)) #=> 3
vm.eval(/(т)(е)(с)/.match('тест').end(1)) #=> 1

vm.evalAsync(/(т)(е)(с)/.match('тест').end(0)) #=> 3291
vm.evalAsync(/(т)(е)(с)/.match('тест').end(1)) #=> 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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