http-protocol 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61546510b1d4238169a5d0217695807d85c620423df4b4e39abb4367ac6b5b1d
4
- data.tar.gz: 7bb0f5e83af9f7ecedcf6a8096624b5375a75b5ba3d9d3fc921efb35de2750ba
3
+ metadata.gz: ab58f8ee09a13973ac493df6d4678e82ecc97bd5eb6d92d10aca12a64acae9e2
4
+ data.tar.gz: 718c199dcecf01e0b288a2b6bc027d66a654c7e3f06796d32ea3e4eaeb00fb41
5
5
  SHA512:
6
- metadata.gz: f7e793901c275a301891fa8a378b2399f73e7bb5da6f0cc07e694f18b3ae106e852ec7a846ed8d0c8ee6020a6df86f948a3f4d8660553f4f1e582be83bf9e4b9
7
- data.tar.gz: eba5b7ba208802bc3757b9963651d08f336923a97c45ea0d85099098ffd887bdfa580606a9645bafd1201fbb828cecc0ab14d37921d91a251a10f37dedaefd05
6
+ metadata.gz: 0ab242c757ea3c2f71024be7411c46bc383a5257b4210dee9b333a75d62d184366a63338088dec6dd5a378a600458897adcb5231fba111df6857dd34ba35bfa7
7
+ data.tar.gz: 589a760a9e0c6a95bbae07c28005b9736c7cd73cba4a5143a2088b6cb50792b7cba977e7f34c41fb057c55ccec012541f39110a79072f835f175749e6f1b4e78
@@ -64,9 +64,22 @@ module HTTP
64
64
  self.new(hash.to_a)
65
65
  end
66
66
 
67
- def initialize(fields = [])
68
- @fields = fields
69
- @indexed = to_h
67
+ def initialize(fields = nil, indexed = nil)
68
+ if fields
69
+ @fields = fields.dup
70
+ else
71
+ @fields = []
72
+ end
73
+
74
+ if indexed
75
+ @indexed = indexed.dup
76
+ else
77
+ @indexed = self.to_h
78
+ end
79
+ end
80
+
81
+ def dup
82
+ self.class.new(@fields, @indexed)
70
83
  end
71
84
 
72
85
  attr :fields
@@ -20,6 +20,6 @@
20
20
 
21
21
  module HTTP
22
22
  module Protocol
23
- VERSION = "0.9.1"
23
+ VERSION = "0.9.2"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-30 00:00:00.000000000 Z
11
+ date: 2018-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-hpack