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

Tweaks and improvements #20

Merged
merged 5 commits into from
Apr 1, 2013
Merged

Tweaks and improvements #20

merged 5 commits into from
Apr 1, 2013

Conversation

threedaymonk
Copy link
Contributor

The main improvement is a small optimisation: reducing the number of calls to gsub.

I've also made a few minor improvements (well, I think they're improvements!):

  • Use module_function to remove the need for def self.foo everywhere
  • Make quoting consistent
  • Swap branches to reduce negation (i.e. if cond/else instead of if !cond/else)
  • Update the deprecated :rubygems gem source in the Gemfile

Once Ruby 1.8.7 reaches end-of-life, we can remove the tr entirely by
using Base64.urlsafe_encode and -_decode (which are implemented in the
standard library by using tr in exactly this way).
progrium added a commit that referenced this pull request Apr 1, 2013
@progrium progrium merged commit 05d44f4 into jwt:master Apr 1, 2013
@progrium
Copy link
Contributor

progrium commented Apr 1, 2013

Excellent, thank you.

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.

2 participants