You can clone with
HTTPS or Subversion.
imap = Net::IMAP.new('imap.gmail.com', :port => 993, :ssl => true)
Fails on rbx-head irb (rubinius-2.0.0.rc1) installed with rvm on OS X 10.8.2 with "SocketError: nodename nor servname provided, or not known". I can ping imap.gmail.com and I can access it from MRI 1.9.3.
There are a few things here. The hash syntax is only added in 1.9, so this syntax will not work in 1.8 mode in Rubinius. In 1.9 mode I see a different error though that has a different cause.
If I get rid of the hash, and just call .new with 'imap.gmail.com' (since I'm in 1.8 mode, I thought I had set the default to 1.9, oh well), then the irb session is blocked. I'm not seeing an error in that case.
I'll try to see what I can see in 1.9 mode.
It also hangs in MRI 1.8 for me here, so probably the same there. I guess it doesn't automatically handle SSL in 1.8.
I'm working on a fix for the problem you're seeing when running this with 1.9 mode, should be done shortly. I'll also make it throw a similar error for the 1.8 case for this script.
If you use 1.8 mode, you do need to pass in true as an extra parameter to indicate SSL in net/imap:
imap = Net::IMAP.new('imap.gmail.com', 993, true)
Throw TypeError on invalid service