Issue #11666 has been updated by Shyouhei Urabe.


As far as I understand RFC4193 never defines its range being "private".  There also are other private-ish address ranges e.g. fd00::/8.  And what about v4-mapped v6 addresses?  IPv6's situation is complicated (at least to me).  I'd suggest OP to leave IPv6 situations untouched.

----------------------------------------
Feature #11666: IPAddr#private?
https://bugs.ruby-lang.org/issues/11666#change-57252

* Author: Masaki Matsushita
* Status: Assigned
* Priority: Normal
* Assignee: Akinori MUSHA
----------------------------------------
I propose a new feature: IPAddr#private?.

Example:

```ruby
IPAddr.new("192.168.1.1").private? #=> true.
```

---Files--------------------------------
patch.diff (1.58 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>