Project

General

Profile

Actions

Bug #13652

closed

Ruby 2.3.4 does not catch Argument error when comparing DateTime with String

Added by derekzwy (Wenyuan Zhang) almost 7 years ago. Updated over 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:81657]

Description

Ruby 2.3.4 does not catch Argument error when comparing DateTime with String, while Ruby 2.1.5 catches it and return false.


Files

ruby 2.3.4.png (168 KB) ruby 2.3.4.png derekzwy (Wenyuan Zhang), 06/13/2017 02:59 AM
ruby 2.1.5.png (133 KB) ruby 2.1.5.png derekzwy (Wenyuan Zhang), 06/13/2017 02:59 AM

Updated by Hanmac (Hans Mackowiak) almost 7 years ago

@derekzwy (Wenyuan Zhang) it is fixed in Ruby2.4.1 and active_support 5.1.1

it looks like the bug does happen in your active_support version.
Try to update to a newer one.

Updated by Glass_saga (Masaki Matsushita) over 6 years ago

  • Status changed from Open to Rejected

It can't be reproduced.

% ruby -v -r "date" -e "p DateTime.parse == 'No End Date'"
ruby 2.5.0dev (2017-08-29 trunk 59656) [x86_64-darwin15]
false
Actions

Also available in: Atom PDF

Like0
Like0Like0