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

Already on GitHub? Sign in to your account

Always pop pushed elements from the stack #1011

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

Previously the constructor checks returned early which would prevent the most recently pushed elements from being popped from the stacks.

Now result is set to false so the the pop lines are still reached after the constructor checks are done.

Always pop pushed elements from the stack
Previously the constructor checks returned early which would
prevent the most recently pushed elements from being popped from
the stacks.

Now result is set to false so the the pop lines are still reached
after the constructor checks are done.
Owner

jashkenas commented May 26, 2013

Eh? I'm afraid I can't merge this without a test proving that the behavior here is being changed in a beneficial way. Mind adding one?

Owner

jashkenas commented Jul 6, 2013

... I guess not.

@jashkenas jashkenas closed this Jul 6, 2013

Contributor

jdalton commented Jul 6, 2013

His patch is good advice anyways. I avoid it in Lo-Dash by simply exiting before the stack push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment