Skip to content

RubyEnumerator.SizeFn does not receive enough context #4688

@headius

Description

@headius

In order to implement enumerators with sizes, we have a SizeFn interface we implement for various types of collection and enumeration. However this interface currently only receives IRubyObject[] which means the runtime, context, self, and other contextual values must be captured (usually as an anonymous inner class) or acquired (e.g. runtime.getCurrentContext()).

This interface should be expanded to accept at least context and self, and all uses should be audited to see if we can make the impls static instances rather than creating them anew each time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions