[ruby-core:125620] [Ruby Feature#17944] Remove Socket.gethostbyaddr and Socket.gethostbyname
Issue #17944 has been updated by Earlopain (Earlopain _). ruby/spec has the following test: ```rb addr = IPAddr.new('::1').hton it 'raises SocketError when the address is not supported by the family' do -> { suppress_warning { Socket.gethostbyaddr(addr, :INET) } }.should.raise(SocketError) end ``` But it doesn't raise and instead returns the following result for me: `["pi.hole", [], 2, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"]`. Given https://github.com/ruby/ruby/commit/41977ef59585d1ee42ffcb546aa80f071512b257, it doesn't look I am the only one this happened to. They print warnings for ~6 years now, so it seems wasted time to investigate this. Can we simply remove them now? ---------------------------------------- Feature #17944: Remove Socket.gethostbyaddr and Socket.gethostbyname https://bugs.ruby-lang.org/issues/17944#change-117472 * Author: pvalena (Pavel Valena) * Status: Open ---------------------------------------- It is marked as unsafe by our static analysis. Can it be removed now? It was deprecated in: https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/6... https://bugs.ruby-lang.org/issues/13097 -- https://bugs.ruby-lang.org/
participants (1)
-
Earlopain (Earlopain _)