From: Aaron Patterson Date: 2011-08-26T02:45:22+09:00 Subject: [ruby-core:39112] Re: [Ruby 1.9 - Feature #5221][Open] LoadEerror#path --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 24, 2011 at 12:28:50PM +0900, Koichi Sasada wrote: >=20 > Issue #5221 has been reported by Koichi Sasada. >=20 > ---------------------------------------- > Feature #5221: LoadEerror#path > http://redmine.ruby-lang.org/issues/5221 >=20 > Author: Koichi Sasada > Status: Open > Priority: Normal > Assignee: Yukihiro Matsumoto > Category: core > Target version: 1.9.4 >=20 >=20 > I read a part of activesupport and they add a method LoadError#path to re= turn unloaded file name (*1). >=20 > *1: https://github.com/rails/rails/blob/master/activesupport/lib/active_s= upport/core_ext/load_error.rb >=20 > How about to add this method on trunk? >=20 > This is a patch with some re-factoring around LoadError: > http://www.atdot.net/sp/view/y5xeql/readonly?lang=3Ddiff Can we make it use a regular ivar for `path` rather than an ivar with no "@"? Using private ivars like this makes life hard for doing introspection (like the introspection required for YAML to dump / load). Like this: https://gist.github.com/1171267 --=20 Aaron Patterson http://tenderlovemaking.com/ --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQEcBAEBAgAGBQJOVooqAAoJEJUxcLy0/6/GSsQIAIhypbeOsnF2vxOo2NhnYgXJ WEukLUv60fQHgCj1Fphdeux3SwasuyjttzJvX3XwKUz9a/0yQqYJKZXHoLdXaobO +QZhoA3RSz/gf2uQMd+IkqpkqVE1VKI9FTxm48di9pn7b8kli78B/Qk82nZDVJsb rm86jud379+2Q7GmZqefF+aQdiTp4N0mL20yudZ+UPSkFn6xom++YBJ+leCg9dDO j6VH6ElgQZumnvHI1gq5t7aUFCJwy+jd3Gy+z//is+IUU8rHWTIOyorQhQZ9ZJOp tPezNOjmsjzp+o/qVPkw55SbKHvvjC8LqzVLX3NLZsgzCM8k3dDu+vrbC2vJ/ls= =5whR -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--