diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2017-12-10 17:31:54 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2017-12-10 17:31:54 +0100 |
commit | 81640ecd848bdcd20de971f80bb975dc721c3477 (patch) | |
tree | 4f47d83685343b235a510cca0f0ce8b0f6c1c5ff /timestring.rb | |
parent | 3c822adf3c4caca07f3d92955a48395b942019b6 (diff) |
bugfix: new ruby version caused exception
Diffstat (limited to 'timestring.rb')
-rw-r--r-- | timestring.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/timestring.rb b/timestring.rb index ff4a220..3f70104 100644 --- a/timestring.rb +++ b/timestring.rb @@ -55,8 +55,9 @@ class TimeString self <=> other end def <=>(other) + return -1 if other.class != TimeString if self.date == other.date - if self.time.class == String && other.time.class == String + if self.time.class == String && other.time.class == String self.time.to_i == other.time.to_i ? self.time <=> other.time : self.time.to_i <=> other.time.to_i elsif self.time.class == Time && other.time.class == Time self.time <=> other.time |