--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 30, 2010 at 07:13:32PM +0900, NARUSE, Yui wrote:
> (2010/03/30 17:55), Tanaka Akira wrote:
> I patched rubygems and got following backtrace.
> This is not happen when only Rubygems tests run.
> On test-all, Psych effects rubygems tests.

I believe this is because both YAML and Psych add Object#to_yaml.

I am working with Eric to convert Rubygems to take advantage of Psych.
That should clear up the problem.

> diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
> index 472d608..49ce51a 100644
> --- a/lib/rubygems/specification.rb
> +++ b/lib/rubygems/specification.rb
> @@ -686,7 +686,13 @@ class Gem::Specification
>      yaml =3D YAML.quick_emit object_id, opts do |out|
>        out.map taguri, to_yaml_style do |map|
>          map.add 'name', @name
> +        begin
>          map.add 'version', @version
> +        rescue =3D> e
> +          p e
> +          p e.backtrace
> +          raise
> +        end
>          platform =3D case @original_platform
>                     when nil, '' then
>                       'ruby'
>=20
>=20
> #<NoMethodError: undefined method `[]' for #<YAML::Syck::Emitter:0x000008=
0f53dee8>>
> ["/home/naruse/ruby/lib/psych/visitors/yaml_tree.rb:8:in `initialize'", "=
/home/naruse/ruby/lib/psych.rb:155:in `new'", "/home/naruse/ruby/lib/psych.=
rb:155:in `dump'", "/home/naruse/ruby/lib/psych/core_ext.rb:13:in `psych_to=
_yaml'", "/home/naruse/ruby/lib/rubygems/specification.rb:697:in `node_expo=
rt'", "/home/naruse/ruby/lib/rubygems/specification.rb:697:in `add'", "/hom=
e/naruse/ruby/lib/rubygems/specification.rb:697:in `block (2 levels) in to_=
yaml'", "/home/naruse/ruby/lib/rubygems/specification.rb:692:in `map'", "/h=
ome/naruse/ruby/lib/rubygems/specification.rb:692:in `block in to_yaml'", "=
/home/naruse/ruby/lib/yaml.rb:411:in `call'", "/home/naruse/ruby/lib/yaml.r=
b:411:in `emit'", "/home/naruse/ruby/lib/yaml.rb:411:in `quick_emit'", "/ho=
me/naruse/ruby/lib/rubygems/specification.rb:690:in `to_yaml'", "/home/naru=
se/ruby/lib/rubygems/builder.rb:74:in `block (2 levels) in write_package'",=
 "/home/naruse/ruby/lib/rubygems/package/tar_output.rb:73:in `block (3 leve=
ls) in add_gem_c
> ontents'", "/home/naruse/ruby/lib/rubygems/package/tar_writer.rb:83:in `n=
ew'", "/home/naruse/ruby/lib/rubygems/package/tar_output.rb:67:in `block (2=
 levels) in add_gem_contents'", "/home/naruse/ruby/lib/rubygems/package/tar=
_output.rb:65:in `wrap'", "/home/naruse/ruby/lib/rubygems/package/tar_outpu=
t.rb:65:in `block in add_gem_contents'", "/home/naruse/ruby/lib/rubygems/pa=
ckage/tar_writer.rb:113:in `add_file'", "/home/naruse/ruby/lib/rubygems/pac=
kage/tar_output.rb:63:in `add_gem_contents'", "/home/naruse/ruby/lib/rubyge=
ms/package/tar_output.rb:31:in `open'", "/home/naruse/ruby/lib/rubygems/pac=
kage.rb:56:in `open'", "/home/naruse/ruby/lib/rubygems/builder.rb:72:in `bl=
ock in write_package'", "/home/naruse/ruby/lib/open-uri.rb:35:in `open'", "=
/home/naruse/ruby/lib/open-uri.rb:35:in `open'", "/home/naruse/ruby/lib/rub=
ygems/builder.rb:71:in `write_package'", "/home/naruse/ruby/lib/rubygems/bu=
ilder.rb:36:in `build'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:2=
69:in `dddbbbggg'
> ", "/home/naruse/ruby/test/rubygems/gemutilities.rb:284:in `block (2 leve=
ls) in util_build_gem'", "/home/naruse/ruby/lib/rubygems/user_interaction.r=
b:40:in `use_ui'", "/home/naruse/ruby/lib/rubygems/user_interaction.rb:63:i=
n `use_ui'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:283:in `block=
 in util_build_gem'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:276:=
in `chdir'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:276:in `util_=
build_gem'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:373:in `block=
 in util_make_gems'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:372:=
in `each'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:372:in `util_m=
ake_gems'", "/home/naruse/ruby/test/rubygems/test_gem.rb:442:in `test_self_=
refresh'", "/home/naruse/ruby/lib/minitest/unit.rb:680:in `run'", "/home/na=
ruse/ruby/lib/minitest/unit.rb:641:in `block (2 levels) in run_test_suites'=
", "/home/naruse/ruby/lib/minitest/unit.rb:635:in `each'", "/home/naruse/ru=
by/lib/minitest/u
> nit.rb:635:in `block in run_test_suites'", "/home/naruse/ruby/lib/minites=
t/unit.rb:634:in `each'", "/home/naruse/ruby/lib/minitest/unit.rb:634:in `r=
un_test_suites'", "/home/naruse/ruby/lib/minitest/unit.rb:594:in `run'", "/=
home/naruse/ruby/lib/minitest/unit.rb:492:in `block in autorun'"]

Thank you for the stack traces!

--=20
Aaron Patterson
http://tenderlovemaking.com/

--45Z9DzgjV8m4Oswq
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iQEcBAEBAgAGBQJLshx/AAoJEJUxcLy0/6/GyNUIAI34g63P8geDPeGiApkXO7LT
ZhGyF91Gk3zy6gYgyoMIy/hvSMm/apHKy+FV2f0VyqQ+Jnj50wwjzb8FuEQi0ilU
kXdp9VQjtCNhK1kGA7ZJweVMcrjYS43cjKNBwl0hozbPuboOU3Ciujqcfe45SVMl
gFD1xpiEJ68Br+KDz40/zPWj1SQhKYoEN451QqM9d7RFNYwaDs31UO0j9jJr32z2
jyMP0bc6HMzxe9Y+E4d3Giq168U+oMthwaOB+eV0fcrSkw9Ww7hmdN3j9cYQOvik
2q6KNxfai189KEoBmYgGZ9B2X3i3hZmNv8JBjhaHQYew3qcbrv+J1MrOdw11IUE=
=yzA1
-----END PGP SIGNATURE-----

--45Z9DzgjV8m4Oswq--

On Tue, Mar 30, 2010 at 07:13:32PM +0900, NARUSE, Yui wrote:
> (2010/03/30 17:55), Tanaka Akira wrote:
> I patched rubygems and got following backtrace.
> This is not happen when only Rubygems tests run.
> On test-all, Psych effects rubygems tests.

I believe this is because both YAML and Psych add Object#to_yaml.

I am working with Eric to convert Rubygems to take advantage of Psych.
That should clear up the problem.

> diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
> index 472d608..49ce51a 100644
> --- a/lib/rubygems/specification.rb
> +++ b/lib/rubygems/specification.rb
> @@ -686,7 +686,13 @@ class Gem::Specification
>      yaml =3D YAML.quick_emit object_id, opts do |out|
>        out.map taguri, to_yaml_style do |map|
>          map.add 'name', @name
> +        begin
>          map.add 'version', @version
> +        rescue =3D> e
> +          p e
> +          p e.backtrace
> +          raise
> +        end
>          platform =3D case @original_platform
>                     when nil, '' then
>                       'ruby'
>=20
>=20
> #<NoMethodError: undefined method `[]' for #<YAML::Syck::Emitter:0x000008=
0f53dee8>>
> ["/home/naruse/ruby/lib/psych/visitors/yaml_tree.rb:8:in `initialize'", "=
/home/naruse/ruby/lib/psych.rb:155:in `new'", "/home/naruse/ruby/lib/psych.=
rb:155:in `dump'", "/home/naruse/ruby/lib/psych/core_ext.rb:13:in `psych_to=
_yaml'", "/home/naruse/ruby/lib/rubygems/specification.rb:697:in `node_expo=
rt'", "/home/naruse/ruby/lib/rubygems/specification.rb:697:in `add'", "/hom=
e/naruse/ruby/lib/rubygems/specification.rb:697:in `block (2 levels) in to_=
yaml'", "/home/naruse/ruby/lib/rubygems/specification.rb:692:in `map'", "/h=
ome/naruse/ruby/lib/rubygems/specification.rb:692:in `block in to_yaml'", "=
/home/naruse/ruby/lib/yaml.rb:411:in `call'", "/home/naruse/ruby/lib/yaml.r=
b:411:in `emit'", "/home/naruse/ruby/lib/yaml.rb:411:in `quick_emit'", "/ho=
me/naruse/ruby/lib/rubygems/specification.rb:690:in `to_yaml'", "/home/naru=
se/ruby/lib/rubygems/builder.rb:74:in `block (2 levels) in write_package'",=
 "/home/naruse/ruby/lib/rubygems/package/tar_output.rb:73:in `block (3 leve=
ls) in add_gem_c
> ontents'", "/home/naruse/ruby/lib/rubygems/package/tar_writer.rb:83:in `n=
ew'", "/home/naruse/ruby/lib/rubygems/package/tar_output.rb:67:in `block (2=
 levels) in add_gem_contents'", "/home/naruse/ruby/lib/rubygems/package/tar=
_output.rb:65:in `wrap'", "/home/naruse/ruby/lib/rubygems/package/tar_outpu=
t.rb:65:in `block in add_gem_contents'", "/home/naruse/ruby/lib/rubygems/pa=
ckage/tar_writer.rb:113:in `add_file'", "/home/naruse/ruby/lib/rubygems/pac=
kage/tar_output.rb:63:in `add_gem_contents'", "/home/naruse/ruby/lib/rubyge=
ms/package/tar_output.rb:31:in `open'", "/home/naruse/ruby/lib/rubygems/pac=
kage.rb:56:in `open'", "/home/naruse/ruby/lib/rubygems/builder.rb:72:in `bl=
ock in write_package'", "/home/naruse/ruby/lib/open-uri.rb:35:in `open'", "=
/home/naruse/ruby/lib/open-uri.rb:35:in `open'", "/home/naruse/ruby/lib/rub=
ygems/builder.rb:71:in `write_package'", "/home/naruse/ruby/lib/rubygems/bu=
ilder.rb:36:in `build'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:2=
69:in `dddbbbggg'
> ", "/home/naruse/ruby/test/rubygems/gemutilities.rb:284:in `block (2 leve=
ls) in util_build_gem'", "/home/naruse/ruby/lib/rubygems/user_interaction.r=
b:40:in `use_ui'", "/home/naruse/ruby/lib/rubygems/user_interaction.rb:63:i=
n `use_ui'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:283:in `block=
 in util_build_gem'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:276:=
in `chdir'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:276:in `util_=
build_gem'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:373:in `block=
 in util_make_gems'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:372:=
in `each'", "/home/naruse/ruby/test/rubygems/gemutilities.rb:372:in `util_m=
ake_gems'", "/home/naruse/ruby/test/rubygems/test_gem.rb:442:in `test_self_=
refresh'", "/home/naruse/ruby/lib/minitest/unit.rb:680:in `run'", "/home/na=
ruse/ruby/lib/minitest/unit.rb:641:in `block (2 levels) in run_test_suites'=
", "/home/naruse/ruby/lib/minitest/unit.rb:635:in `each'", "/home/naruse/ru=
by/lib/minitest/u
> nit.rb:635:in `block in run_test_suites'", "/home/naruse/ruby/lib/minites=
t/unit.rb:634:in `each'", "/home/naruse/ruby/lib/minitest/unit.rb:634:in `r=
un_test_suites'", "/home/naruse/ruby/lib/minitest/unit.rb:594:in `run'", "/=
home/naruse/ruby/lib/minitest/unit.rb:492:in `block in autorun'"]

Thank you for the stack traces!

--=20
Aaron Patterson
http://tenderlovemaking.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iQEcBAEBAgAGBQJLshx/AAoJEJUxcLy0/6/GyNUIAI34g63P8geDPeGiApkXO7LT
ZhGyF91Gk3zy6gYgyoMIy/hvSMm/apHKy+FV2f0VyqQ+Jnj50wwjzb8FuEQi0ilU
kXdp9VQjtCNhK1kGA7ZJweVMcrjYS43cjKNBwl0hozbPuboOU3Ciujqcfe45SVMl
gFD1xpiEJ68Br+KDz40/zPWj1SQhKYoEN451QqM9d7RFNYwaDs31UO0j9jJr32z2
jyMP0bc6HMzxe9Y+E4d3Giq168U+oMthwaOB+eV0fcrSkw9Ww7hmdN3j9cYQOvik
2q6KNxfai189KEoBmYgGZ9B2X3i3hZmNv8JBjhaHQYew3qcbrv+J1MrOdw11IUE=
=yzA1
-----END PGP SIGNATURE-----