Skip to content

Commit

Permalink
Merge pull request #2 from ganmacs/support-2.3
Browse files Browse the repository at this point in the history
support 2.3 on CI
  • Loading branch information
ioquatix committed Jul 9, 2019
2 parents 605806b + 97a3690 commit 025fa1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cache: bundler

matrix:
include:
- rvm: 2.3
- rvm: 2.4
- rvm: 2.5
- rvm: 2.6
Expand Down
1 change: 1 addition & 0 deletions lib/protocol/http2/frame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# THE SOFTWARE.

require_relative 'error'
require_relative 'monkey_patch'

module Protocol
module HTTP2
Expand Down
10 changes: 10 additions & 0 deletions lib/protocol/http2/monkey_patch.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
begin
''.unpack1('*')
rescue => NoMethodError
# for compat ruby 2.3
class String
def unpack1(template)
unpack(template).first
end
end
end

0 comments on commit 025fa1c

Please sign in to comment.