From: Aaron Patterson Date: 2010-04-11T09:58:06+09:00 Subject: [ruby-core:29428] Re: [Bug #3112] require "yaml" doesn't use psych as default --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 11, 2010 at 09:20:15AM +0900, NARUSE, Yui wrote: > (2010/04/11 8:48), Aaron Patterson wrote: > > I am surprised about the rubygems failures. With the following patch, I > > am able to run the rubygems tests, like this: > >=20 > > $ GEM_HOME=3D/tmp GEM_PATH=3D/tmp make test-all TESTS=3Drubygems > >=20 > > diff --git a/lib/yaml.rb b/lib/yaml.rb > > index 9b5a9b2..0151973 100644 > > --- a/lib/yaml.rb > > +++ b/lib/yaml.rb > > @@ -40,4 +40,4 @@ module Psych > > ENGINE =3D YAML::ENGINE > > end > >=20 > > -YAML::ENGINE.yamler =3D engine > > +YAML::ENGINE.yamler =3D 'psych' > > diff --git a/test/rubygems/gemutilities.rb b/test/rubygems/gemutilities= =2Erb > > index bb94750..cea1dbe 100644 > > --- a/test/rubygems/gemutilities.rb > > +++ b/test/rubygems/gemutilities.rb > > @@ -8,13 +8,7 @@ else > > require 'rubygems' > > end > > require 'fileutils' > > -begin > > - gem 'minitest', '>=3D 1.3.1' > > - require 'minitest/unit' > > -rescue Gem::LoadError > > - warn "Install minitest gem>=3D 1.3.1" > > - raise > > -end > > +require 'minitest/unit' > > require 'tmpdir' > > require 'uri' > > require 'rubygems/package' >=20 > Bundled minitest is 1.6.0(-dev?) after r27076, so why this is needed... I'm not sure. I've applied this to trunk with Eric's permission. > > diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/te= st_gem_specification.rb > > index 5979890..337073f 100644 > > --- a/test/rubygems/test_gem_specification.rb > > +++ b/test/rubygems/test_gem_specification.rb > > @@ -1,5 +1,6 @@ > > require_relative 'gemutilities' > > require 'stringio' > > +require 'date' > > require 'rubygems/specification' > >=20 > > class TestGemSpecification< RubyGemTestCase > >=20 > >=20 > > Some of the Syck YAML tests (like test_spec_application_family and > > test_spec_url_escaping) contain invalid YAML, so Psych will raise an > > exception. Do `diff test/yaml/test_yaml.rb test/psych/test_yaml.rb` to > > see the differences. >=20 > Yeah, I know some of them are intended. > I want to confirm taht all of them are from invalid YAML. >=20 > > I will make test/yaml/* use the syck engine. >=20 > OK, it may have to move to test/syck. Yes. I've moved test/yaml to test/syck. > > I can't run make test-all on Snow Leopard because of the problem I > > mentioned in [ruby-core:29087]. I will try on linux. >=20 > Can you make a ticket in Redmine for [ruby-core:29087]? Done: http://redmine.ruby-lang.org/issues/show/3124 > For workaround you can run test-all like following: > make RUBYOPT=3D-w TESTS=3D'-v -x "test/drb|test/socket"' test-all I will use this. Thank you! --=20 Aaron Patterson http://tenderlovemaking.com/ --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iQEcBAEBAgAGBQJLwR6aAAoJEJUxcLy0/6/GzoQH/R+nFoLFO6FCrM+MmDYg9GPx Vg4At3w7HIfsyl48kpBeup7NR0ZhbhgGMJEBEL02HBYaHXWNV1VIYTgpoLz/9MzU bUYVokEaWhGf+jczMC3CnkGy6fNwGg18byi27CduRvDvl6jg+GbiY3oAVlgxwHp1 w2qiUsT8LNaf7ztmqzq30tzrpSQjnS2tsk0ao984z2tDXn2R8eYunJx2AH6TRQuW DsPhPkeOwdcjGvMjp+Pvek4KK0tSnloQ8B2MGLgrGfMqFyg6p987JAukVo+wgn0g z4OOl/bHf/FcFE7G6VZdxPSrTf39QznOXi1hJvzVsr1XtD1vSMBkYn2dEj7dVoA= =LIOA -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--