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

Refactor to remove redundant calls and variables #240

Merged
merged 1 commit into from
Sep 9, 2018

Conversation

ashmaroli
Copy link
Member

  • replace hash[key] && hash[key][subkey] with simpler Ruby 2.3's hash.dig(key, subkey)
  • memoize config stashes
  • prefer hash.each_value to avoid unnecessary allotment for unused block parameter
  • prefer Object#tap over explicit local variable assignment (cosmetic change)

@DirtyF
Copy link
Member

DirtyF commented Sep 9, 2018

T.I.L about dig 👍

@DirtyF
Copy link
Member

DirtyF commented Sep 9, 2018

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 2a82f18 into jekyll:master Sep 9, 2018
jekyllbot added a commit that referenced this pull request Sep 9, 2018
@ashmaroli ashmaroli deleted the redundancy-refactor branch September 9, 2018 16:43
@jekyllbot jekyllbot mentioned this pull request Sep 9, 2018
@jekyll jekyll locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants