From: James Gray on
On Jul 5, 2008, at 12:24 PM, Michael Lommel wrote:

> Here is the code so far:

> newfile = File.open(filename, "r"){|f| f.read}.ukquotes.ukspell

> Produces this error message:
>
> <code>
> cw-replace.rb:44: private method `ukquotes' called for
> #<String:0x7755d8> (NoMethodError)
> from cw-replace.rb:43:in `each'
> </code>

In the line shown above, you read the contents of a file into a
String, then try to call the ukquotes() method on that String.

You didn't define that method for Strings though. Instead, you
defined it to have the String passed in as an argument.

Thus, you probably want to rewrite that line as something like:

newfile = ukspell(ukquotes(File.read(filename)))

I hope that helps.

James Edward Gray II