diff options
author | Kouhei Yanagita <yanagi@shakenbu.org> | 2023-01-22 18:53:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 18:53:02 +0900 |
commit | 20a85ab6119964d1ff129f9c6676fa2a7b2a2be4 (patch) | |
tree | a484952f92a62b17e1666639cbf1680d0afe4e7f /numeric.rb | |
parent | cad09f7098d11ae32e5c10fa3726399621b4f8bd (diff) |
Fix Integer#ceildiv to respect #coerce (#7118)
Fixes [Bug #19343]
Notes
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'numeric.rb')
-rw-r--r-- | numeric.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.rb b/numeric.rb index f026679210..0a1f14865f 100644 --- a/numeric.rb +++ b/numeric.rb @@ -278,7 +278,7 @@ class Integer # # 3.ceildiv(1.2) # => 3 def ceildiv(other) - -div(-other) + -div(0 - other) end # |