coherence

This commit is contained in:
Gwenhael Le Moine 2023-01-17 16:16:55 +01:00
parent 3666c19602
commit 4483bb5e13
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -21,7 +21,7 @@ module Types
def self.can_parse?( value )
# we systematically trim enclosing ()
value = value[1..-2] if value.is_a?( String ) && (value[0] == '(') && (value[-1] == ')')
value = value[1..-2] if value.is_a?( String ) && value[0] == '(' && value[-1] == ')'
!Complex( value, exception: false ).nil?
end