# Net-ping 1.2.0

**URL:** <https://www.ruby-forum.com/t/net-ping-1-2-0/78832>\
**Category:** Ruby\
**Created:** [December 8, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/net-ping-1-2-0/78832 "2006-12-08T22:56:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [December 8, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/net-ping-1-2-0/78832/1 "2006-12-08T22:56:16Z")

</div>

Hi all,

I’m happy to announce the release of net-ping 1.2.0. This release has  
some major, but backwards compatible, changes.

# What’s New?

First and foremost there’s now a Ping::ICMP class. Many thanks go to  
Jos B. for providing the initial implementation of this method.

Second, you can now specify the host in either the constructor or  
within the ping method. So, both of these are valid:

list\_of\_hosts.each do |host|  
tcp = Net::Ping::TCP.new(host)  
unless tcp.ping?  
# Do something  
end  
end

tcp = Net::Ping::TCP.new  
list\_of\_hosts.each do |host|  
unless tcp.ping?(host)  
# Do something  
end  
end

Other changes include:

- Class names are now scoped like Ping::TCP, instead of PingTCP. Not  
to panic. I included class name aliases for now so your code will stay  
backwards compatible (for now).

- The Net::Ping::HTTP class saw some improvements. Namely, it now  
honors the timeout value, and optionally follows redirects.

- Added a pingecho alias to all the classes.

- The ability to be more selective in your requires in order to reduce  
your memory footprint. So, “require ‘net/ping’” will require all  
subclasses, while “require ‘net/ping/tcp’” would only require the  
Net::Ping::TCP subclass.

(Each subclass is now in its own file, btw).

# Where is it?

You can find it on the RAA or RubyForge:

[http://raa.ruby-lang.org/project/net-ping/](http://raa.ruby-lang.org/project/net-ping/)  
[http://www.rubyforge.org/projects/shards](http://www.rubyforge.org/projects/shards)

# MS Windows Users

You will need to install the win32-open3 package (for which there is  
now a gem). Select the “mswin32” option if you want the binary, or  
“ruby” if you want to build from source.

Enjoy!

- Dan

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [December 9, 2006, 1:30am UTC](https://www.ruby-forum.com/t/net-ping-1-2-0/78832/2 "2006-12-09T01:30:35Z")

</div>

On Sat, Dec 09, 2006 at 06:55:06AM +0900, Daniel B. wrote:

> Hi all,
> 
> I’m happy to announce the release of net-ping 1.2.0. This release has  
> some major, but backwards compatible, changes.

Thanks Daniel!
