Skip to content

Commit

Permalink
Fix: undefined method split for an instance of Integer (NoMethodError)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wagner Caixeta committed Sep 16, 2024
1 parent 082cc58 commit d04b78b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protocol/http/header/split.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Split < Array
COMMA = /\s*,\s*/

def initialize(value)
if value
if value && value.respond_to?(:split)
super(value.split(COMMA))
else
super([])
Expand Down

0 comments on commit d04b78b

Please sign in to comment.