From: Brian Candler Date: 2010-03-01T23:15:13+09:00 Subject: Re: What is '?' in Ruby? Alexander Bubnov wrote: > I know > Ruby 1.8 '?a' => 97 > Ruby 1.9 '?a' => "a" It's a character literal - but in 1.9 a character is a one-character string (possibly multiple bytes) rather than an Integer for a single byte in 1.8. You'll see the same difference with "a"[0] > Really I would like to where I can get specification of operator, > keyword, function or something else I do know what is name of '?'... For 1.8 (actually 1.6.8 :-) http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_stdtypes.html "You can also get the integer value corresponding to an ASCII character or escape sequence by preceding it with a question mark" For 1.9: you have to buy the more recent version of this book. > Please just point to chapter of ruby specification Please point me to any ruby specification :-) Actually, there is a project which is attempting to create a specification of Ruby for standardisation; it was linked to in this mailing list within the last few days. However it's using 1.8.7 as it's starting point, on the grounds that 1.9 is still a moving target. I attempted to document strings in 1.9, but only got as far as documenting about 200 behaviours. http://github.com/candlerb/string19/blob/master/string19.rb -- Posted via http://www.ruby-forum.com/.