e$B@>;3OB9-$G$9!#e(B
ipaddre$B$Ge(B
IPAddr.new(“127.0.0.0/8”).include?(“127.0.0.1”)
e$B$,e(Bfalsee$B$K$J$C$FG:$s$@$3$H$,$"$k$N$G!"J8;zNs$b<+F0$GJQ49$7$Fe(B
e$B$&$1$D$1$F$/$l$k$H4r$7$$$N$G$O$J$$$+$H;W$$$^$9!#e(B
e$B@>;3OB9-$G$9!#e(B
ipaddre$B$Ge(B
IPAddr.new(“127.0.0.0/8”).include?(“127.0.0.1”)
e$B$,e(Bfalsee$B$K$J$C$FG:$s$@$3$H$,$"$k$N$G!"J8;zNs$b<+F0$GJQ49$7$Fe(B
e$B$&$1$D$1$F$/$l$k$H4r$7$$$N$G$O$J$$$+$H;W$$$^$9!#e(B
At Sun, 30 Sep 2007 00:27:59 +0900,
Kazuhiro NISHIYAMA wrote:
西山和広ã§ã™ã€‚
ipaddrã§
IPAddr.new(“127.0.0.0/8”).include?(“127.0.0.1”)
ãŒfalseã«ãªã£ã¦æ‚©ã‚“ã ã“ã¨ãŒã‚ã‚‹ã®ã§ã€æ–‡å—列も自動ã§å¤‰æ›ã—ã¦
ã†ã‘ã¤ã‘ã¦ãれるã¨å¬‰ã—ã„ã®ã§ã¯ãªã„ã‹ã¨æ€ã„ã¾ã™ã€‚今ã¯
IPAddr.new(“127.0.0.0/8”).include?(IPAddr.new(“127.0.0.1”))
ã˜ã‚ƒãªã„ã¨ã ã‚。
 ã“ã†ã™ã‚‹ã¨ã„ã„ã‹ãªã€‚
— ipaddr.rb (revision 13588)
+++ ipaddr.rb (working copy)
@@ -105,14 +105,26 @@
return s
end
other
self.class.new(other)
self.class.new(other, @family)
def |(other)
@@ -132,10 +144,7 @@
def ==(other)
return false
@@ -153,6 +162,7 @@
def include?(other)
if other.ipv4_mapped?
else
end
other_addr = other.to_i
other_family = family
if other.ipv4_mapped?
other_addr = (other.to_i & IN4MASK)
other_family = Socket::AF_INET
else
other_addr = other.to_i
other_family = other.family
end
if family != other_family
 ã¤ã„ã§ã« <=> 㨠succ を定義ã—㦠Comparable ã«ã™ã‚‹ã¨ã€ Range ã‚’
作ã£ãŸã‚Šã§ãã¾ã™ã。
ライブラリã®ãƒ¡ãƒ³ãƒ†ãƒŠã®è©±ã§æ€ã„ã ã—ãŸã€‚
 梅本ã•ã‚“ã«CCã—ã¦ãŠãã¾ã™ã€‚
–
/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp
“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs