better_ipaddr 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 77e832f6c7d7f6dc51281e3a00dbc4ac43c582c7
4
- data.tar.gz: 57d339efecf6b8d195faf516438e9dbe6df63a6f
3
+ metadata.gz: 6da20bca129dcd3612daf2fab3514185f4afe3a5
4
+ data.tar.gz: 648d2d1ddbc3f441ce9a2e1c8819105e9fd902d7
5
5
  SHA512:
6
- metadata.gz: feded15fc34a564ddbab41eb3d1d0306b20ffd53125e2fd259be970b3dd034b7d6ae34056f71b985635e64020b508aae5fea82a5a606e9affee552c178cf115c
7
- data.tar.gz: cf706c0395daef99367fad7dbdd70b6fbf701f4f33f740845556c66b5f7b876ecfd324ca601127809904c52d82d8fd79c71662144e6c41fc30230ec1e6ba2c57
6
+ metadata.gz: 3b02d16f6d4b03f3ab668f13cab5a3f9ad983a28a8535d8643a9f0cbf1234930ec2358ef1a814622937ad53e31d64aeea6519643eb593913c2875d9505c7bd95
7
+ data.tar.gz: 95770066db8bc6725faa929c9274ac620aaa3bd83d7f08307b578f9446bfdb133a5b065aae9e281e6b01f18483fb1f374c7b2bcac7d4ba09834eb1113235141c
@@ -130,6 +130,7 @@ module BetterIpaddr
130
130
  # @return [IPAddr] the address at the given index
131
131
 
132
132
  def [](offset)
133
+ return self if offset.zero? && host?
133
134
  offset2 = offset >= 0 ? offset : size + offset
134
135
  self.class[to_i + offset2, family: family]
135
136
  end
@@ -1,3 +1,3 @@
1
1
  module BetterIpaddr
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_ipaddr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
11
+ date: 2016-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.5.1
100
+ rubygems_version: 2.5.2
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: IPAddr enhancements for network management.