From: "Юрий Соколов" Date: 2015-10-22T14:12:00+03:00 Subject: [ruby-core:71151] Re: id_table cannot work for const_tbl --001a11c3811a6858820522af90c3 Content-Type: text/plain; charset=UTF-8 But, is "class path name resolution" specified somewhere? In other words: perhaps it matters more to change tests instead of abandoning this idea. "class path name resolution" affects only runtime generated classes (created by `MyClass = Class.new()`, and not `class MyClass`) (and WEBrick::HTTPStatus::Unauthorized is runtime generated). And it only may break code which relies on stringified class path name of such runtime-generated classes (which is very rare in practice). This particular test can be fixed, if `const_set(err_name, err_class)` will force name resolution for `err_class` if its name not already resolved. 2015-10-22 5:47 GMT+03:00 Eric Wong : > [Posting to hopefully prevent somebody else from going down > the same path I did and wasting time working on a patch] > > I started working on the following patch to use id_table for > const tables, but apparently ordering matters for class path name > resolution: > > http://80x24.org/spew/20151022023752.9038-1-e%4080x24.org/raw > > So unless I'm missing something, I'll reject it. > --001a11c3811a6858820522af90c3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
But, is "class path name resolution" specified s= omewhere?
In other words:
perhaps it matters more to change tests in= stead of abandoning this idea.

"class path name resoluti= on" affects only runtime generated classes
(created by `MyCl= ass =3D Class.new()`, and not `class MyClass`)
(and=C2=A0WEBrick:= :HTTPStatus::Unauthorized is runtime generated).

A= nd it only may break code which relies on stringified class path name of
such runtime-generated classes=C2=A0(which is very rare in practice= ).

This particular test can be fixed, if `con= st_set(err_name, err_class)` will force
name resolution for `err_= class` if its name not already resolved.

201= 5-10-22 5:47 GMT+03:00 Eric Wong <normalperson@yhbt.net>= :
[Posting to hopefully prevent somebody else from going down
=C2=A0the same path I did and wasting time working on a patch]

I started working on the following patch to use id_table for
const tables, but apparently ordering matters for class path name
resolution:

=C2=A0 http://80x24.org/spew/2015102202= 3752.9038-1-e%4080x24.org/raw

So unless I'm missing something, I'll reject it.

--001a11c3811a6858820522af90c3--