Project

General

Profile

Actions

Bug #19926

closed

Range#size returns an incorrect result for ranges with a Rational endpoint

Added by kyanagi (Kouhei Yanagita) 7 months ago. Updated 7 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-10-12T17:32:45Z master 81399a5c46) [arm64-darwin22]
[ruby-core:115035]

Description

% ~/tmp/ruby-master/bin/ruby -e '(1...3.1r).each { p _1 }'
1
2
3
% ~/tmp/ruby-master/bin/ruby -e 'p (1...3.1r).size'
2
% ~/tmp/ruby-master/bin/ruby -e 'p (1...3.1).size'
3
Actions #2

Updated by kyanagi (Kouhei Yanagita) 7 months ago

  • Status changed from Open to Closed

Applied in changeset git|b28c1d2c5644c726bba60cd35ce9313da6e86a4f.


[Bug #19926] Fix Range#size for ranges with a Rational endpoint

Actions

Also available in: Atom PDF

Like0
Like0Like0