Skip to content

Commit

Permalink
Switch to binary mode to fix Encoding::UndefinedConversionError
Browse files Browse the repository at this point in the history
  • Loading branch information
Wade committed Apr 23, 2020
1 parent 4136e14 commit 1a7c42b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/passbook/pkpass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def file(options = {})
options[:file_name] ||= 'pass.pkpass'

temp_file = Tempfile.new(options[:file_name])
temp_file.binmode
temp_file.write self.stream.string
temp_file.close

Expand Down

3 comments on commit 1a7c42b

@orest-kostiuk
Copy link

Choose a reason for hiding this comment

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

+1

@climbingcode
Copy link

Choose a reason for hiding this comment

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

+1

@ryantk
Copy link

@ryantk ryantk commented on 1a7c42b Nov 24, 2020

Choose a reason for hiding this comment

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

+1

Please sign in to comment.