Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong InvalidAddressError message #60

Open
tapalilov opened this issue Oct 25, 2023 · 0 comments
Open

Wrong InvalidAddressError message #60

tapalilov opened this issue Oct 25, 2023 · 0 comments

Comments

@tapalilov
Copy link

tapalilov commented Oct 25, 2023

After changes from #16 and removing of

  rescue InvalidAddressError => e
    raise e.class, "#{e.message}: #{addr}"

exception no longer returns proper exception message with invalid ip address.

ruby 3.0

> IPAddr.new('192.168.0.1000')
ipaddr.rb:598:in `rescue in initialize': invalid address: 192.168.0.1000 (IPAddr::InvalidAddressError)

ruby 3.1

> IPAddr.new('192.168.0.1000')
ipaddr.rb:656:in `block in in_addr': invalid address:  (IPAddr::InvalidAddressError)

Best regards,
Georgi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant