Skip to content

Add specs for Enumerable value packing rule (0->nil, 1->value, N->Array)#1363

Open
sampokuokkanen wants to merge 1 commit into
ruby:masterfrom
sampokuokkanen:enumerable-value-packing
Open

Add specs for Enumerable value packing rule (0->nil, 1->value, N->Array)#1363
sampokuokkanen wants to merge 1 commit into
ruby:masterfrom
sampokuokkanen:enumerable-value-packing

Conversation

@sampokuokkanen
Copy link
Copy Markdown
Contributor

The rb_enum_values_pack rule in enum.c packs yielded source values when they flow through any Enumerable collection method or Lazy stage: 0 args -> nil, 1 arg -> the value, N args -> Array.

Pin this explicitly via a shared describe used by both Enumerable#take and Enumerator::Lazy#take.

The rb_enum_values_pack rule in enum.c packs yielded source values when they flow through any Enumerable collection method or Lazy stage: 0 args -> nil, 1 arg -> the value, N args -> Array.

Pin this explicitly via a shared describe used by both Enumerable#take and Enumerator::Lazy#take.
@sampokuokkanen sampokuokkanen force-pushed the enumerable-value-packing branch from 1e86572 to 5c4352c Compare May 27, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant