Advertisement
Guest User

Untitled

a guest
Jan 11th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. diff --git a/src/socket/address.cr b/src/socket/address.cr
  2. index 5b1fc76..b7f7d42 100644
  3. --- a/src/socket/address.cr
  4. +++ b/src/socket/address.cr
  5. @@ -107,8 +107,8 @@ class Socket
  6. def address
  7. @address ||= begin
  8. case family
  9. - when Family::INET6 then address(@addr6)
  10. - when Family::INET then address(@addr4)
  11. + when Family::INET6 then address(@addr6.not_nil!)
  12. + when Family::INET then address(@addr4.not_nil!)
  13. else raise "unsupported IP address family: #{family}"
  14. end
  15. end
  16. @@ -132,10 +132,6 @@ class Socket
  17. end
  18. end
  19.  
  20. - private def address(addr) : Nil
  21. - # shouldn't happen
  22. - end
  23. -
  24. def ==(other : IPAddress)
  25. family == other.family &&
  26. port == other.port &&
  27. --
  28. 2.1.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement