Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add 'broadcast' method to IPAddress::IPv6 #31

wants to merge 1 commit into from

5 participants


broadcast method was missing in IPAddress::IPv6.

I needed it because I store networks broadcast address in DB (this way I can find network hosts by searching ones between network and broadcast addresses).


Does someone manage this repo ?


Unfortunately author abandoned this project :(

I think community should fork and claim this gem on rubygems.


Thanks, but only the author commited to the repo so it's not easy to know who could take it over...


@bluemonk Not being in the standard library doesn't make your gem useless (I actually prefer chossing y gems than having a fat standard library full of things I don't use).

I think the increase is due to the growing need of IPv6 (look at most recent pull requests).


@bluemonk I think that being part of the stdlib is a neat idea, but having a great gem for working with IPAddresses is really valuable regardless of whether I get it in the standard distribution of ruby.

I've been involved in working with ip addresses in ruby extensively before, and we ended up writing a library in C that was a lot lighter and faster which we pulled back into ruby. This library is pretty awesome and I hope you know that even though you haven't released in a number of years, you're getting a lot of downloads. 2,379,792 to be exact.

Do you perhaps want a co-maintainer to help?


I've been using your gem at, @bluemonk. It's good stuff.

Maybe we could organized the interested contributors on this thread into a review team for PRs. Could establish a cadence to incorporate 1-3 PRs a month (or review them at least and ask contributors to tighten/test sections better. I'd be glad to be part of this sort of effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 8, 2013
  1. @gauthier-delacroix
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/ipaddress/ipv6.rb
12 lib/ipaddress/ipv6.rb
@@ -496,6 +496,18 @@ def bits
+ # Returns the broadcast address for the given IP.
+ #
+ # ip = IPAddress("2001:db8::8:800:200c:417a/64")
+ #
+ # ip.broadcast.to_s
+ # #=> "2001:db8::ffff:ffff:ffff:ffff"
+ #
+ def broadcast
+ self.class.parse_u128(broadcast_u128, @prefix)
+ end
+ #
# Expands an IPv6 address in the canocical form
# IPAddress::IPv6.expand "2001:0DB8:0:CD30::"
Something went wrong with that request. Please try again.