I have to agree with David here. All he is pointing out is that an  
implementation of String#ord which only works on single character strings  
may be a "waste". It is quite reasonable to explore ways of extending its  
domain to include all of the class if it makes sense to do so. Adding an  
optional index seems like a perfectly sensible thing to do to me - upward  
compatible with the "single-character only" version, simple & efficient to  
implement, and probably quite useful.

Mike.

On Thu, 08 Feb 2007 07:41:27 +1100, David Flanagan  
<david / davidflanagan.com> wrote:


> Geez!  What does it take to satisfy you guys!  :-)
>
> Seriously, though, I thought that my suggestion for an optional index  
> argument to ord was a modest and sensible one.  Actually, I thought I  
> was just pointing out an oversight and I'm surprised at the resistance  
> it has faced.  Given the richness of the core Ruby API, I assume that  
> decisions about adding methods are based on elegance, and that is  
> permitted or even desirable to have more than one way to do something.