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

Make tests pass with JRuby #112

Merged
merged 3 commits into from
May 3, 2018
Merged

Make tests pass with JRuby #112

merged 3 commits into from
May 3, 2018

Conversation

kostyadubinin
Copy link
Contributor

@kostyadubinin kostyadubinin commented May 2, 2018

Closes #99

  • Fix a typo in the zip parser that causes tests to fail with JRuby.
  • Add support for Ruby 2.2

@@ -40,7 +40,7 @@ def directory?(zip_entry)

def decode_filename(filename, likely_unicode:)
filename.force_encoding(Encoding::UTF_8) if likely_unicode
filename.encode(Encoding::UTF_8, undefined: :replace, replace: UNICODE_REPLACEMENT_CHAR)
filename.encode(Encoding::UTF_8, undef: :replace, replace: UNICODE_REPLACEMENT_CHAR)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julik
Copy link
Contributor

julik commented May 3, 2018

Good stuff 👌 What if we remove the safe navigation operator and replace it with something more old-fashioned - will we then become compatible with 9.0? We can then reintroduce 2.2 compatibility as well?

@kostyadubinin
Copy link
Contributor Author

Hey Julik, I will check if the safe navigation is the only issue.

This change is needed because JRuby 9.0 doesn't support safe navigation (&.)
which is used in this gem and causes all the tests to fail. Example:
https://travis-ci.org/WeTransfer/format_parser/jobs/373545169#L551

Issue in the JRuby repo: jruby/jruby#3479
@kostyadubinin
Copy link
Contributor Author

Safe navigation turned out to be the only issue with Ruby 2.2 and JRuby 9.0. Fixed in 02d8480

Also I added the Unreleased section to the changelog, but if you don't use it I can remove it.

@julik
Copy link
Contributor

julik commented May 3, 2018

👍 cool. Thanks for the PR!

@julik julik merged commit 4b7aa2c into WeTransfer:master May 3, 2018
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