Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0609d64
commit 341a883
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
341a883
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.
test-unit was removed from Ruby in version 2.2 and moved into a gem, so the comparison should probably test for a RUBY_VERSION >= 2.2, but I can't think of an easy way to do that comparison.
341a883
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.
Hmmm, yeah. I guess I could split up the version string?
I just don't understand what Bundler doesn't provide this. It's silly
:platform
thingy is super not future proof. I suppose another option would be to move to a test framework not coupled to the platform…341a883
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 best I can think of is
if RUBY_VERSION.scan(/\d+/).map(&:to_i) >= [2, 2]
, but that's not super self explanatory.