--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Please tell me whether this is a bug in MRI 1.8.7 and 1.9.1 or am I not
getting something (note that the below is reproducible only for certain
values of i):

>> require 'set'
=3D> true
>> i =3D 2305860601668175887
=3D> 2305860601668175887
>> i.class
=3D> Fixnum
>> Set[i].eql? Set[i]
=3D> true
>> Set[i].hash =3D=3D Set[i].hash
=3D> false

I can reproduce this under
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
and
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]


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-Bit =
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 Se=
rver VM 1.6.0_14) [amd64-java]
gets it right:

>> require 'set'
=3D> true
>> i =3D 2305860601668175887
=3D> 2305860601668175887
>> i.class
=3D> Fixnum
>> Set[i].eql? Set[i]
=3D> true
>> Set[i].hash =3D=3D Set[i].hash
=3D> true


=E2=80=94 Shot
--=20
If you give someone a program, you will frustrate them for a day; if
you teach them how to program, you will frustrate them for a lifetime.

--jI8keyz6grp/JLjh
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)

iEUEARECAAYFAkqZrLoACgkQi/mCfdEo8Uo2nwCgicqCEgDFgsAoiDpXC0nQmtas
zlcAmKmracbM+0th5aM6yFxnztnttM8=
=Aar6
-----END PGP SIGNATURE-----

--jI8keyz6grp/JLjh--

Please tell me whether this is a bug in MRI 1.8.7 and 1.9.1 or am I not
getting something (note that the below is reproducible only for certain
values of i):

>> require 'set'
=> true
>> i = 2305860601668175887
=> 2305860601668175887
>> i.class
=> Fixnum
>> Set[i].eql? Set[i]
=> true
>> Set[i].hash == Set[i].hash
=> false

I can reproduce this under
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
and
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]


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-Bit Server VM 1.6.0_14) [amd64-java]
seem to implement Set#eql? different:

>> Set[i].eql? Set[i]
=> false
>> Set[i].hash == Set[i].hash
=> 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:

>> require 'set'
=> true
>> i = 2305860601668175887
=> 2305860601668175887
>> i.class
=> Fixnum
>> Set[i].eql? Set[i]
=> true
>> Set[i].hash == Set[i].hash
=> true


 Shot
-- 
If you give someone a program, you will frustrate them for a day; if
you teach them how to program, you will frustrate them for a lifetime.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEUEARECAAYFAkqZrLoACgkQi/mCfdEo8Uo2nwCgicqCEgDFgsAoiDpXC0nQmtas
zlcAmKmracbM+0th5aM6yFxnztnttM8=
=Aar6
-----END PGP SIGNATURE-----