lib/ipaddress/ipv6.rb in ipaddress-0.8.0 vs lib/ipaddress/ipv6.rb in ipaddress-0.8.2

- old
+ new

@@ -250,9 +250,18 @@ def [](index) @groups[index] end alias_method :group, :[] + # + # Updated the octet specified at index + # + def []=(index, value) + @groups[index] = value + initialize("#{IN6FORMAT % @groups}/#{prefix}") + end + alias_method :group=, :[]= + # # Returns a Base16 number representing the IPv6 # address # # ip6 = IPAddress "2001:db8::8:800:200c:417a/64"