okkez e$B$G$9!#e(B
ipaddr e$B$Ge(B IPv4 e$B%"%I%l%9$r0J2<$NJ}K!$G:n@.$7$?>l9g$Ke(B
IPAddr#to_range e$B$9$k$He(B
ArgumentError e$B$,H/@8$7$^$9!#e(B
% ruby-1.8.x -ripaddr -ve “IPAddr.new(‘192.168.1.1’).to_range”
ruby 1.8.7 (2008-06-09 patchlevel 5000) [i686-linux]
/home/kenji/all-ruby/ruby-1.8.x/lib/ruby/1.8/ipaddr.rb:371:in set': invalid address (ArgumentError) from /home/kenji/all-ruby/ruby-1.8.x/lib/ruby/1.8/ipaddr.rb:347:in
to_range’
from -e:1
e$B0J2<$N%Q%C%A$Ge(B IPAddr#to_range e$B$OF0$/$h$&$K$J$j$^$9!#e(B
Index: lib/ipaddr.rb
— lib/ipaddr.rb (revision 17148)
+++ lib/ipaddr.rb (working copy)
@@ -483,7 +483,7 @@
if prefixlen
mask!(prefixlen)
else
-
@mask_addr = (family == Socket::AF_INET) ? IN4MASK : IN6MASK
-
end@mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
end