-
Notifications
You must be signed in to change notification settings - Fork 15
Changes to maintain ruby 1.8.7 compatability #15
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| source 'https://rubygems.org' | ||
|
|
||
| gemspec | ||
|
|
||
| # For Ruby 1.8.7 compatability | ||
| gem 'json', '1.8.6' if RUBY_VERSION < '1.9' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| require "json" | ||
|
|
||
| require_relative "r2d2/payment_token" | ||
| require "r2d2/payment_token" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,10 @@ | |
| require "r2d2" | ||
|
|
||
| require "minitest/autorun" | ||
| require "pry-byebug" | ||
|
|
||
| begin | ||
| require "pry-byebug" | ||
| rescue LoadError | ||
| # Ignore, byebug is not installed for older ruby versions | ||
| end | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would love to see dev/debug-specific tooling like pry removed all together. Any thoughts on that?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with this, because I'm used to working with older ruby versions where we can't use these tools anyway. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will, I believe, break forward Ruby compatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current tests in place all pass with this line removed. I must admit I didn't look any further than that. If it does break forward ruby compatibility we should be able to put together a test that confirms this.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is safe to remove, AES-CTR is not an AEAD mode so it didn't make sense anyway. Older OpenSSL gems just didn't complain about it. Starting with OpenSSL gem 2.0 (bundled with Ruby 2.4) it started getting stricter (e.g. raising error on too long keys instead of truncating).