hi
when I type " puts ?a " irb doesn't return ASCII code of a
character.why?
···
--
Posted via http://www.ruby-forum.com/.
hi
when I type " puts ?a " irb doesn't return ASCII code of a
character.why?
--
Posted via http://www.ruby-forum.com/.
$ multiruby ruby.rb
VERSION = 1.8.6-p420
CMD = ~/.multiruby/install/1.8.6-p420/bin/ruby ruby.rb
97
RESULT = pid 94689 exit 0
VERSION = 1.8.7-p352
CMD = ~/.multiruby/install/1.8.7-p352/bin/ruby ruby.rb
97
RESULT = pid 94690 exit 0
VERSION = 1.9.1-p431
CMD = ~/.multiruby/install/1.9.1-p431/bin/ruby ruby.rb
a
RESULT = pid 94691 exit 0
VERSION = 1.9.2-p290
CMD = ~/.multiruby/install/1.9.2-p290/bin/ruby ruby.rb
a
RESULT = pid 94692 exit 0
TOTAL RESULT = 0 failures out of 4
Passed: 1.8.6-p420, 1.8.7-p352, 1.9.1-p431, 1.9.2-p290
Failed:
--
Posted via http://www.ruby-forum.com/.
Excuse me, I don't understand what do you mean . please explain very
basic.
I am really beginner.
--
Posted via http://www.ruby-forum.com/.
Things change.
--
Posted via http://www.ruby-forum.com/.
Hello Amir e.
Use this instead for 1.9.2:
'a'.ord
97.chr
if you want to keep with the semantics of ? then you can always add
ordinal after the ? sigil which will convert it to a string:
?a.ord
~Stu
On Sun, Jul 24, 2011 at 6:37 AM, amir e. <aef1370@gmail.com> wrote:
Excuse me, I don't understand what do you mean . please explain very
basic.
I am really beginner.--
Posted via http://www.ruby-forum.com/\.