On Dec 3, 2010, at 12:39 , Stu wrote:

> I was curious why the prefix ? for ascii code was removed in 1.9.x?

It wasn't removed, it just changed what it returns to work with =
multibyte chars:

> multiruby -e 'p ?c'
>=20
> VERSION =3D 1.8.6-p399
> CMD     =3D ~/.multiruby/install/1.8.6-p399/bin/ruby -e p ?c
>=20
> 99
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.8.7-p302
> CMD     =3D ~/.multiruby/install/1.8.7-p302/bin/ruby -e p ?c
>=20
> 99
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.9.1-p129
> CMD     =3D ~/.multiruby/install/1.9.1-p129/bin/ruby -e p ?c
>=20
> "c"
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.9.2-p0
> CMD     =3D ~/.multiruby/install/1.9.2-p0/bin/ruby -e p ?c
>=20
> "c"
>=20
> RESULT =3D 0
>=20
> TOTAL RESULT =3D 0 failures out of 4
>=20
> Passed: 1.9.2-p0, 1.9.1-p129, 1.8.6-p399, 1.8.7-p302
> Failed:=20

If you want compatibility between 1.8 and 1.9, I suggest the following:

> 505 % multiruby -e 'class String; def ord; self[0]; end unless =
"".respond_to? :ord; end; p "c".ord'
>=20
> VERSION =3D 1.8.6-p399
> CMD     =3D ~/.multiruby/install/1.8.6-p399/bin/ruby -e 'class String; =
def ord; self[0]; end unless "".respond_to? :ord; end; p "c".ord'
>=20
> 99
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.8.7-p302
> CMD     =3D ~/.multiruby/install/1.8.7-p302/bin/ruby -e 'class String; =
def ord; self[0]; end unless "".respond_to? :ord; end; p "c".ord'
>=20
> 99
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.9.1-p129
> CMD     =3D ~/.multiruby/install/1.9.1-p129/bin/ruby -e 'class String; =
def ord; self[0]; end unless "".respond_to? :ord; end; p "c".ord'
>=20
> 99
>=20
> RESULT =3D 0
>=20
> VERSION =3D 1.9.2-p0
> CMD     =3D ~/.multiruby/install/1.9.2-p0/bin/ruby -e 'class String; =
def ord; self[0]; end unless "".respond_to? :ord; end; p "c".ord'
>=20
> 99
>=20
> RESULT =3D 0
>=20
> TOTAL RESULT =3D 0 failures out of 4
>=20
> Passed: 1.9.2-p0, 1.9.1-p129, 1.8.6-p399, 1.8.7-p302
> Failed:=20
> 505 %=20
>=20