You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ree-1.8.7-2010.02 > Tickle.parse('beginning of the week')
NoMethodError: undefined method <=>' for :special:Symbol from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle.rb:139:insort'
from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle.rb:139:in same?' from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/handler.rb:27:inguess_unit_types'
from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/handler.rb:11:in guess' from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/tickle.rb:90:inparse'
from (irb):7
I looked into the source but I don't grasp the structure enough to figure it out. Any tips?
It seems the issue is just with the .same? method and symbols. I hacked up a replacement which doesn't guarantee that the arrays are identical, but they're at least similar:
Array.class_eval do
def same?(second)
self.inject(true){|x,y| x && second.include?(y)} && second.inject(true){|x,y| x && self.include?(y)}
end
end
Trying this example from the docs...
Tickle.parse('beginning of the week')
I get the following error:
ree-1.8.7-2010.02 > Tickle.parse('beginning of the week')
NoMethodError: undefined method
<=>' for :special:Symbol from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle.rb:139:in
sort'from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle.rb:139:in
same?' from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/handler.rb:27:in
guess_unit_types'from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/handler.rb:11:in
guess' from /Users/jcasimir/.rvm/gems/ree-1.8.7-2010.02@rails2/gems/tickle-0.1.7/lib/tickle/tickle.rb:90:in
parse'from (irb):7
I looked into the source but I don't grasp the structure enough to figure it out. Any tips?
Versions:
tickle (0.1.7)
chronic (0.3.0)
activesupport (2.3.10)
The text was updated successfully, but these errors were encountered: