From: "Shot (Piotr Szotkowski)" Date: 2009-08-30T09:41:59+09:00 Subject: [ruby-core:25190] Re: Set#hash different for two Sets which are eql? --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Shot (Piotr Szotkowski): > >> i =3D 2305860601668175887 > =3D> 2305860601668175887 [=E2=80=A6] > ruby 1.8.6 (2009-06-08 patchlevel 369) [x86_64-linux] > and > jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) 64-Bi= t Server VM 1.6.0_14) [amd64-java] > seem to implement Set#eql? different: > >> Set[i].eql? Set[i] > =3D> false > >> Set[i].hash =3D=3D Set[i].hash > =3D> false > While JRuby with the --1.9 switch > jruby 1.3.1 (ruby 1.9.1p0) (2009-06-15 2fd6c3d) (Java HotSpot(TM) 64-Bit = Server VM 1.6.0_14) [amd64-java] > gets it right: I just chekced JRuby=E2=80=99s trunk, and it seems they switched =66rom 1.8.6 compatibility to 1.8.7 compatibility, as both jruby 1.4.0dev (ruby 1.9.1p0) (2009-08-30 38fdbf9) (Java HotSpot(TM) 64-Bit= Server VM 1.6.0_14) [amd64-java] and jruby 1.4.0dev (ruby 1.8.7p174) (2009-08-30 38fdbf9) (Java HotSpot(TM) 64-B= it Server VM 1.6.0_14) [amd64-java] return the same hashes for Set[2305860601668175887] (and consider two such sets eql?), which seems like the right result from my point of view. =E2=80=94 Shot --=20 221 2.7.0 Error: I can break rules, too. Goodbye. [Postfix] --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqZytMACgkQi/mCfdEo8UojUwCeIb/xQ/BFTj7XXEH+T/AIfewk kwgAoIPQfJM/jlHv1f1REjVs67hM9Krh =sdLA -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS--