rapid7 / rex-socket

The Rex Socket Abstraction Library
Other
12 stars 33 forks source link

Add github actions for testing and some changes to support Ruby 3 #27

Closed cgranleese-r7 closed 3 years ago

cgranleese-r7 commented 3 years ago

This PR adds some changes that were required to transition over to Ruby 3, as well as adding GitHub actions for testing.

Adding GitHub actions for testing: image

This PR fixes the following Ruby 3 deprecation warnings: image

Note

Some tests were removed, the previous ::Socket.gethostbyname() returned an array of information, which included the byte address associated with host/hostname. The new ::Addrinfo.getaddrinfo() now returns an array of addresses only.

Any other code that was dependant on ::Socket.gethostbyname() returning the byte addresses has been changed to handle that with a separate method call.

Ruby 3 upgrade ticket https://github.com/rapid7/metasploit-framework/issues/14666