Yuichi Masuda wrote:
> 
> On Sun, 5 Nov 2000 21:00:11 +0900
> "Guy N. Hurst" <gnhurst / hurstlinks.com> wrote:
> 
> > 1)
> > Is there some alternative to the following:
> >
> > def ord
> >   ?(self[0].to_s)
> > end
> >
> > obviously this doesn't work.  Am I missing some other method?
> >
> 
> Is this what you want?
> 
> irb(main):001:0> class String
> irb(main):002:1>   def ord
> irb(main):003:2>     self[0]
> irb(main):004:2>   end
> irb(main):005:1> end
> nil
> irb(main):006:0> s = "abc"
> "abc"
> irb(main):007:0> s.ord
> 97
> 

Oh dear, I've been up too long!  How obvious.  :-O

Thanks,


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA - (757)623-9688
PHP/MySQL - Ruby/Perl - HTML/Javascript