Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal::Array#& #140

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Literal::Array#& #140

merged 1 commit into from
Nov 11, 2024

Conversation

joeldrapper
Copy link
Owner

@joeldrapper joeldrapper commented Nov 11, 2024

Add support for the bitwise AND operator on Literal::Arrays.

See #134

Add support for the bitwise AND operator on `Literal::Array`s.
def &(other)
case other
when ::Array
Literal::Array.allocate.__initialize_without_check__(
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can skip type checking here because the result is a subset of elements already in the array.

@joeldrapper joeldrapper merged commit 85594a9 into main Nov 11, 2024
10 checks passed
@joeldrapper joeldrapper deleted the literal-array-& branch November 11, 2024 00:17
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