From: Austin Ziegler Date: 2007-08-31T12:31:41+09:00 Subject: Re: Ruby stupidities On 8/30/07, Kenneth McDonald wrote: > Having said that, here's my first entry. I think it's utterly stupid > (can you tell I just wasted some time tracking this down?) that > > "abc"[0] == "a" > > is false. Why doesn't that work? Because, with a single index, the array > access operator on a string returns, not the character at the given > position, but the _character code_ of the character at that position. It would be useful if you actually looked what's happening in the future: this will be changed for Ruby 1.9. It is, in fact, a sensible choice to make given the nature of strings in Ruby. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca