Project

General

Profile

Bug #19864 » range_test_2.rb

jgomo3 (Jesús Gómez), 09/06/2023 12:17 PM

 
require 'date'

today = Date.today
yesterday = today - 1
(..today) === yesterday

# ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
# No Error

# ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
# range_test_2.rb:5:in `===': cannot determine inclusion in beginless/endless ranges (TypeError)
#
# (..today) === yesterday
# ^^^^^^^^^
# from range_test_2.rb:5:in `<main>'

(2-2/3)