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

Always pop pushed elements from the stack #1011

Closed
wants to merge 1 commit into from

Conversation

kevinsawicki
Copy link

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.

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.
@jashkenas
Copy link
Owner

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?

@jashkenas
Copy link
Owner

... I guess not.

@jashkenas jashkenas closed this Jul 6, 2013
@jdalton
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants