From: Gary Wright Date: 2008-02-22T07:02:46+09:00 Subject: Re: Options for String#encode On Feb 21, 2008, at 4:16 AM, Martin Duerst wrote: > I'm now looking for comments on how to name these and further options. Instead of a :block option, simply yield to the block if it is given. Let the caller figure out what to do instead of overloading the interface with lots and lots of options. str.encode('target') { |source, problem| .... } If the block returns nil, pretend the source didn't exist. If the block returns a string, use that as the transcoded version of the source. The problem argument could provide some context. Gary Wright