Issue #11210 has been updated by Akinori MUSHA.

Status changed from Open to Assigned

Sorry for being inactive.

I've made some comments in the above PR.

I can't recall the exact reason why there's no access to the netmask provided, but one main design concept of IPAddr by the original author (Ume-san) was to allow manipulating IP addresses independent of what family each instance is in, so I'd welcome the PR in that it introduces an address family independent class for returning values.

Except for a few things I mentioned in the PR, it looks good to merge, so please toss your feedback to it if you have any opinions.  Thank you.

----------------------------------------
Feature #11210: IPAddr has no public method to get the current subnet mask
https://bugs.ruby-lang.org/issues/11210#change-58056

* Author: Herwin .
* Status: Assigned
* Priority: Normal
* Assignee: Akinori MUSHA
----------------------------------------
Both to_s and to_string omit the subnet mask of an IP address. The only way to query it via public methods is to manually parse the output of inspect. 



-- 
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>