chronic
                                
                                 chronic copied to clipboard
                                
                                    chronic copied to clipboard
                            
                            
                            
                        Crash: Undefined method '+' for nil:Nilclass
NoMethodError (undefined method `+' for nil:NilClass):
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_minute.rb:48:in `offset'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/handlers.rb:431:in `handle_srp'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/handlers.rb:457:in `handle_s_r_a_s_r_p_a'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/handler.rb:76:in `invoke'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/parser.rb:254:in `block in tokens_to_span'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/parser.rb:251:in `each'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/parser.rb:251:in `tokens_to_span'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic/parser.rb:61:in `parse'
/Users/bram/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/chronic-0.10.2/lib/chronic.rb:90:in `parse'
Failing on the string "26 of November 3 to 5"
Such format isn't supported.
This much I know. But Chronic shouldn't crash my app. It's supposed to return nil if it can't parse it.
Yeah, that's why it's also a bug but there are a lot of inputs which could crash it, you should catch those exceptions even if Chronic would be 100% safe.