[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23221] Re: [Bug #1336] Change in string representation of Floats

From: "Shot (Piotr Szotkowski)" <shot@...>
Date: 2009-04-16 16:29:58 UTC
List: ruby-core #23221
Gary Wright:

> IEEE also defines negative 0.0, which
> has interesting behavior in Ruby  (1.8):

> >> z = 0.0
> >> nz = -0.0
> >> p z
> 0.0
> => nil
> >> p nz
> -0.0
> => nil
> >> z == nz
> => true
> >> z.eql? nz
> => true

> I would have thought that z.eql?(nz) might be false. There doesn't 
> seem to be a way to query a float to distinguish between -Infinity
> and Infinity

These actually aren’t ==, eql? nor equal?

> or between -0.0 and 0.0 other than via #to_s.

-0.0.equal? 0.0 # => false

— Shot
-- 
Nobody came to my trombone recital. I wish there was some
way to express how I feel right now. [Joshua Green Allen]

Attachments (1)

signature.asc (197 Bytes, application/pgp-signature)

In This Thread