From: Brian Candler Date: 2010-10-30T05:29:20+09:00 Subject: Re: undefined method `each' Russ Forsythe wrote in post #958057: > Before I explain the issue I’m having I should preface it with some > important information. I’m a novice programmer at best and I’m new to > Ruby… > > I’m trying to capture the authentication token from Nessus so I can use > it to run scans, reports, etc. I found the following code on the Nessus > site but I’m getting “undefined method `each' for > # (NoMethodError)” from a line of code near the > bottom (response.body.each do |line|). I’m using Ruby 1.9.1 running on > Linux (Ubuntu 10.04). Any insight you can provide would be much > appreciated! ruby 1.8 had String#each, ruby 1.9 does not. Use String#each_line instead. (However, strangely, IO#each still exists) -- Posted via http://www.ruby-forum.com/.