REBOL3 tracker
  0.9.12 beta
Ticket #0001459 User: anonymous

Project:



rss
TypeBug Statuscomplete Date5-Feb-2010 23:31
Versionalpha 96 CategoryDatatype Submitted byBrianH
PlatformAll Severityminor Priorityhigh

Summary EQUAL? and other comparison actions of binary! are case-insensitive
Description The EQUAL? action of binary! appears to be using case-insensitive ASCII comparison, as are EQUIV?, >, >=, <, and <=. Binaries don't have case, so this is bad. Strict binary comparison should be done instead.

STRICT-EQUAL?, STRICT-NOT-EQUAL? and SAME? work properly.
Example code
>> #{0141} = #{0161}
== true  ; should be false
>> #{0141} < #{0161}
== false  ; should be true
>> #{0141} >= #{0161}
== true  ; should be false
>> #{0161} <= #{0141}
== true  ; should be false
>> #{0141} > #{0161}
== false  ; should be true
>> equiv? #{0141} #{0161}
== true  ; should be false
>> #{0141} == #{0161}
== false
>> #{0141} !== #{0161}
== true 
>> #{0141} =? #{0161}
== false

Assigned ton/a Fixed inalpha 97 Last Update25-Sep-2013 09:56


Comments
(0001969)
Carl
6-Feb-2010 04:58

BrianH, is there a typo in the example code?
(0001980)
BrianH
6-Feb-2010 20:18

Yeah, fixed.
(0004010)
Ladislav
25-Sep-2013 09:41

In the core-tests suite

Date User Field Action Change
25-Sep-2013 09:56 Ladislav Status Modified tested => complete
25-Sep-2013 09:41 Ladislav Comment : 0004010 Added -
8-Feb-2010 03:38 BrianH Status Modified built => tested
6-Feb-2010 20:18 BrianH Comment : 0001980 Added -
6-Feb-2010 20:17 BrianH Code Modified -
6-Feb-2010 04:58 carl Description Modified -
6-Feb-2010 04:58 carl Code Modified -
6-Feb-2010 04:58 carl Fixedin Modified => alpha 97
6-Feb-2010 04:58 carl Status Modified submitted => built
6-Feb-2010 04:58 carl Comment : 0001969 Added -
5-Feb-2010 23:31 BrianH Ticket Added -