Nntp sample code

I’m trying to do this sample (third one): http://nntp.rubyforge.org/ as
follows:

thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ ruby nntp.rb
/home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/nntp.rb:400:in
do_start': private method open’ called for
Net::InternetMessageIO:Class
(NoMethodError)
from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/
nntp.rb:380:in start' from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/ nntp.rb:321:in start’
from nntp.rb:6:in `’
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ cat nntp.rb
require ‘rubygems’
require ‘nntp’

newsgroup = ‘gmane.comp.lang.ruby.general’

Net::NNTP.start(‘news.gmane.org’, 119) do |nntp|
message_ids = nntp.listgroup(newsgroup)
nntp.group(newsgroup)
message_ids[1].each do |id|
nntp.head(id).each do |header|
header.each { |line| puts(line) if line.index(‘Subject:’) }
end
end
end
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ type rvm | head -1
rvm is a function
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ rvm --version

rvm 1.10.3 by Wayne E. Seguin [email protected], Michal P.
[email protected] [https://rvm.beginrescueend.com/]

thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ gem --version
1.8.19
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ ruby --version
ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$
thufir@dur:~/ruby/nntp$ gem list --local | grep nntp
nntp (1.0.0)
ruby-net-nntp (1.0.0)
thufir@dur:~/ruby/nntp$

now when I look at Module: Net — Documentation for net (1.9.2)
InternetMessageIO I don’t even see method “open,” so was that method
removed from the class? Or, is there a problem with the sample code?
Or
my ruby install? Odd that sample code gives an error, like the library
is the problem.

thanks,

Thufir

On Thu, 22 Mar 2012 23:55:09 +0900, thufir wrote:

I’m trying to do this sample (third one): http://nntp.rubyforge.org/ as
follows:

Aha, it is, or appears to be, a bug:

http://rubyforge.org/tracker/index.php?
func=detail&aid=28116&group_id=706&atid=2803

So, in the interim, how do you use nntp? I’m not proficient enough to
troubleshoot the API, unfortunately.

-Thufir