ruby / uri

URI is a module providing classes to handle Uniform Resource Identifiers
https://ruby.github.io/uri/
Other
85 stars 46 forks source link

Rewrite `IPAddr.new.include?` with pure Ruby bit operation #110

Open hsbt opened 4 months ago

hsbt commented 4 months ago

I want to reduce across stdlib dependencies. I remove IPAddr and rewrite that to rough bit operation.

knu commented 3 months ago

it also has to reject invalid addresses that IPAddr rejects.

Maybe this is not a strict requirement because it silently ignores any malformed address and returns false.

hsbt commented 3 months ago

@knu Thanks, I also agree your comment. I added only simple IPv4 and IPv6 pattern. I keep open this until another idea will be available.