struct

Crinja::Value

Inherits Comparable < Iterable < Enumerable < Struct < Value < Object

Value#<=> (behind <, >, sort, min, max) compares a string with anything as strings, but upstream tested the left operand twice (a.is_a?(String) || a.is_a?(String)), so "a" > 1 and [1, "a"] | max worked while 1 < "a" and ["a", 1] | max raised: the answer depended on operand order. Both orders now compare as strings (an array too, unless both sides are arrays).

Instance methods

truthy?

Returns true unless this value is false, 0, nil or #undefined?

Source