Skip to content

Reimplement sprintf #6913

Description

@enebo

Working on bugs involving sprintf are difficult. We have a massive switch statement and a lot of complicated state toggling. We also have an implementation where parsing is done at the same time as outputting the result string. If parsing was in a separate phase we could save the parsing result to a cache (potentially even callsite caching it). We could also consider bytecode compiling it.

This is a significant addition to JRuby 9.4. It will minimally cache parsed format strings (if frozen) and we will add support for %a/%A. We also plan on fixing all tagged specs and MRI test suite failures.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions