[BUGFIX beta] Enumerable#any bug - not always returning a boolean#13363
[BUGFIX beta] Enumerable#any bug - not always returning a boolean#13363bryanaka wants to merge 2 commits intoemberjs:masterfrom
Conversation
…can return a value that is not a boolean.
|
hate to be a bother, but was wondering if this PR is valid or not? I know it has some possibly far-reaching consequences (people relying on the buggy behavior), and the fact that it may be removed with iterators and more of the newer Array functions like Array#some being so well supported. I'm cc'ing original commenters on the #12533 @pixelhandler @Serabe |
|
☔ The latest upstream changes (presumably #13658) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Thank you for this effort and sorry for having let it sit for so long 🙇. I have to side with your argument about the possible breaking changes this bugfix will introduce. |
closes #12533
Enumerable#anyis supposed to return only a boolean, but is currently returning whatever truthy value is returned in the callback. This changed functionality is now aligned withArray#some.Potentially a breaking change if someone was relying on the buggy functionality. It was introduced here - #4144