chronic
chronic copied to clipboard
parse broken against "t" (String)
Hi,
I thought it will return nil but
2.0.0-p598 :001 > require 'chronic'
=> true
2.0.0-p598 :002 > Chronic.parse("t")
NoMethodError: undefined method `start=' for nil:NilClass
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/handlers.rb:517:in `get_anchor'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/handlers.rb:414:in `handle_r'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/handler.rb:76:in `invoke'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/parser.rb:247:in `block in tokens_to_span'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/parser.rb:244:in `each'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/parser.rb:244:in `tokens_to_span'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic/parser.rb:61:in `parse'
from /home/zak/.rvm/gems/ruby-2.0.0-p598/gems/chronic-0.10.2/lib/chronic.rb:90:in `parse'
from (irb):2
from /home/zak/.rvm/rubies/ruby-2.0.0-p598/bin/irb:12:in `<main>'
It's a known bug #230, #272 and it's fixed on master (with #243) but haven't released yet.