From: Harry Kakueki Date: 2009-07-21T12:04:03+09:00 Subject: Re: getting char from string as fixnum in 1.8 and 1.9 > preferably without the RUBY_VERSION test, without adding methods to > String, and without losing much efficiency compared with 1.8's String#[]. > > This may not be pretty, but you do not need to add anything. It works on 1.8.6, 1.8.7, and 1.9.0 if byte is good enough. s[2..2].each_byte{|f| p f} Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/ruby/list.html