[#11439] comments needed for Random class — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

15 messages 2007/06/12

[#11450] Re: new method dispatch rule (matz' proposal) — David Flanagan <david@...>

This is a late response to the very long thread that started back in

17 messages 2007/06/13

[#11482] Ruby Changes Its Mind About Non-Word Characters — James Edward Gray II <james@...>

Does this look like a bug to anyone else?

10 messages 2007/06/16

[#11505] Question about the patchlevel release cycle — Sylvain Joyeux <sylvain.joyeux@...4x.org>

1.8.6 thread support was broken in bad ways. It stayed for three months

20 messages 2007/06/20
[#11512] Re: Question about the patchlevel release cycle — Urabe Shyouhei <shyouhei@...> 2007/06/20

Hi, I'm the 1.8.6 branch manager.

[#11543] Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch — James Edward Gray II <james@...>

On Jun 27, 2007, at 4:47 PM, Bill Kelly wrote:

10 messages 2007/06/27

Re: Odd beaviour with Fixnum#div on negative numbers with floats

From: Bertram Scharpf <lists@...>
Date: 2007-06-08 11:24:47 UTC
List: ruby-core #11428
hi,

Am Donnerstag, 07. Jun 2007, 22:55:46 +0900 schrieb Florian Gross:
> Here's something odd I discovered (same behaviour on 1.8.4  
> (2005-12-24) and 1.9.0 (2007-04-02)):
> 
> irb(main):001:0> -1.div(2.0)
> => 0
> irb(main):002:0> -1.div(2)
> => -1
> irb(main):003:0> -1.divmod(2.0)
> => [-1.0, 1.0]
> irb(main):004:0> -1.divmod(2)
> => [-1, 1]
> 
> I'm on i686-darwin8.8.1. For PPC -1.div(2.0) produces -1.

Here:

  irb(main):001:0> -1.div(2.0)
  => -1
  irb(main):002:0> -1.div(2)
  => -1
  irb(main):003:0> -1.divmod(2.0)
  => [-1, 1.0]
  irb(main):004:0> -1.divmod(2)
  => [-1, 1]
  irb(main):005:0> RUBY_VERSION
  => "1.8.5"
  irb(main):006:0> `uname -sr`
  => "Linux 2.6.20-gentoo-r8\n"
  irb(main):007:0> File.read("/proc/cpuinfo").grep /model/
  => ["model\t\t: 8\n", "model name\t: AMD Sempron(tm)   2800+\n"]

Strange!

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

In This Thread

Prev Next