Skip to content

[3.1.0-rc regression] negative integer division does not round to negative infinity #5678

@lopopolo

Description

@lopopolo

Reproduction

MRI

$ ruby -e 'puts RUBY_VERSION' -e 'puts RUBY_ENGINE' -e 'puts -1 / 2'
3.1.1
ruby
-1

mruby @ 3.1.0-rc

$ ./bin/mruby -e 'puts RUBY_VERSION' -e 'puts RUBY_ENGINE' -e 'puts -1 / 2'
-e:3:7: warning: ambiguous first argument; put parentheses or even spaces
3.1
mruby
0

HEAD:

$ git show
commit 6f2efebbb9e0d43ca471d89ea76f396baa43eb62 (HEAD, tag: 3.1.0-rc, origin/stable)
Merge: f29924c83 7e7f1b2f1
Author: mimaki <hiroshi.mimaki@gmail.com>
Date:   Mon Jan 17 21:36:52 2022 +0900

    Merge commit '7e7f1b2' into stable

mruby @ 3.0.0

$ ./bin/mruby -e 'puts RUBY_VERSION' -e 'puts RUBY_ENGINE' -e 'puts -1 / 2'
-e:3:7: warning: ambiguous first argument; put parentheses or even spaces
3.0
mruby
-1

HEAD:

$ git show
commit 0f45836b5954accf508f333f932741b925214471 (HEAD, tag: 3.0.0)
Author: mimaki <hiroshi.mimaki@gmail.com>
Date:   Fri Mar 5 17:07:35 2021 +0900

    Update version and release date. (mruby 3.0.0 (2021-03-05))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions