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

is_deeply: fix handling of VSTRING and LVALUE refs #918

Merged
merged 1 commit into from Oct 24, 2023

Conversation

haarg
Copy link
Member

@haarg haarg commented May 23, 2023

VSTRING and LVALUE are possible return types from ref, but they are essentially special cases of SCALAR refs. As far as is_deeply is concerned, they should be treated as equivalent.

Update the _type function to normalize VSTRING and LVALUE into SCALAR, so that the deep checks properly treat them as equivalent.

This fixes errors from doing comparisons with LVALUE refs, as well as fixing VSTRINGs comparing equal to an equivalent normal SCALAR string.

Fixes #916

VSTRING and LVALUE are possible return types from ref, but they are
essentially special cases of SCALAR refs. As far as is_deeply is
concerned, they should be treated as equivalent.

Update the _type function to normalize VSTRING and LVALUE into SCALAR,
so that the deep checks properly treat them as equivalent.

This fixes errors from doing comparisons with LVALUE refs, as well as
fixing VSTRINGs comparing equal to an equivalent normal SCALAR string.
@exodist
Copy link
Member

exodist commented Oct 23, 2023

@haarg Are we sure this will not break anything unnecessarily?

@haarg
Copy link
Member Author

haarg commented Oct 24, 2023

I highly doubt this will break anything. As shown in the linked issue, the values impacted are currently causing an error rather than any comparison result that can be used.

@exodist exodist merged commit ee07627 into Test-More:master Oct 24, 2023
14 checks passed
@haarg haarg deleted the is_deeply_lvalue branch October 24, 2023 17:44
exodist added a commit that referenced this pull request Oct 24, 2023
    - Fix #882
    - Fix handling of VSTRING and LVALUE refs in is_deeply() #918
    - Merge several doc fixes from mauke
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.

Whoa
2 participants