IPAddr#to_range raise ArgumentError

okkez e$B$G$9!#e(B

ipaddr e$B$Ge(B IPv4 e$B%"%I%l%9$r0J2<$NJ}K!$G:[email protected]$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:into_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
    
  •  @mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
    
    end
    end

okkez e$B$G$9!#e(B

e$B0JA0!"=P$7$?%a!<%k$G$9$,!"K:$l$i$l$F$7$^$C$F$$$k$N$G$7$g$&$+!)e(B

1.8, 1.9 e$B$H$b$KF1$8Nc30$,H/@8$7$^$9!#e(B

e$B$<j?t$r$$+$1$7$^$9$,!"$43NG’$*4j$$$7$^$9!#e(B

2008/06/13 18:00 okkez [email protected]:

e$B$3$s$K$A$O!#e(B

In message [email protected]
on Mon, 7 Jul 2008 13:42:50 +0900,
okkez [email protected] wrote:

e$B0JA0!"=P$7$?%a!<%k$G$9$,!"K:$l$i$l$F$7$^$C$F$$$k$N$G$7$g$&$+!)e(B
[email protected]$i$+$K%P%0$H$o$+$C$F$$$k$h$&$J;v9$,K:$l$5$i$l$k$3$H$rKI$0$K$O!"LdBje(B [email protected]%7%9%F%$KEPO?$9$k$3$H$r$*4+$a$7$^$9!#e(B

http://redmine.ruby-lang.org/

e$B$3$s$K$A$O!#e(B
okkez e$B$G$9!#e(B

e$B%"%I%P%$%9$"$j$,$H$&$4$6$$$^$9!#e(B
e$BLdBj$rEPO?$7$F$_$^$7$?!#e(B

2008/07/09 11:58 Takahiro K. [email protected]:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs