Any idea what''s going on in the following? $ gem install chronic $ cat test.rb require ''rubygems'' require ''chronic'' puts Chronic.parse(''3pm'') $ mono ir.exe test.rb /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:68:in `next'': can''t convert IronRuby::Builtins::RubyObject into Float (TypeError) from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:67:in `next'' from :0:in `catch'' from mscorlib:0:in `CallSite.Target'' from Microsoft.Scripting.Core:0:in `invoke_object__this___CallSite_RubyScope_object_Proc_SymbolId'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:107:in `this'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:348:in `find_within'' from mscorlib:0:in `CallSite.Target'' from Microsoft.Scripting.Core:0:in `invoke_object__this___CallSite_RubyScope_object_SymbolId'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:326:in `get_anchor'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:219:in `handle_r'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:16707566:in `tokens_to_span'' from :0:in `__send__'' from mscorlib:0:in `CallSite.Target'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:50:in `tokens_to_span'' from :0:in `each'' from mscorlib:0:in `CallSite.Target'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/chronic.rb:84:in `parse'' from test.rb:3 from mscorlib:0:in `CallSite.Target'' -- Seo Sanghyeon
I have seen that error message. The fix was the one-line change in Protocols.cs in http://github.com/shri/ironruby/commit/09b25e8c573464dc5868ab2521bd631a013527c7. You can apply that change by hand (its not in the main ironruby repo yet) and see if that fixes the problem. The error message is somewhat generic, and it may or may not be the same issue. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Seo Sanghyeon Sent: Tuesday, May 12, 2009 11:46 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Strange type error Any idea what''s going on in the following? $ gem install chronic $ cat test.rb require ''rubygems'' require ''chronic'' puts Chronic.parse(''3pm'') $ mono ir.exe test.rb /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:68:in `next'': can''t convert IronRuby::Builtins::RubyObject into Float (TypeError) from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:67:in `next'' from :0:in `catch'' from mscorlib:0:in `CallSite.Target'' from Microsoft.Scripting.Core:0:in `invoke_object__this___CallSite_RubyScope_object_Proc_SymbolId'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_time.rb:107:in `this'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:348:in `find_within'' from mscorlib:0:in `CallSite.Target'' from Microsoft.Scripting.Core:0:in `invoke_object__this___CallSite_RubyScope_object_SymbolId'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:326:in `get_anchor'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:219:in `handle_r'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:16707566:in `tokens_to_span'' from :0:in `__send__'' from mscorlib:0:in `CallSite.Target'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/handlers.rb:50:in `tokens_to_span'' from :0:in `each'' from mscorlib:0:in `CallSite.Target'' from /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/chronic.rb:84:in `parse'' from test.rb:3 from mscorlib:0:in `CallSite.Target'' -- Seo Sanghyeon _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
2009/5/13 Shri Borde <Shri.Borde at microsoft.com>:> I have seen that error message. The fix was the one-line change in Protocols.cs in http://github.com/shri/ironruby/commit/09b25e8c573464dc5868ab2521bd631a013527c7. You can apply that change by hand (its not in the main ironruby repo yet) and see if that fixes the problem. The error message is somewhat generic, and it may or may not be the same issue.It didn''t fix the problem. Probably a different issue. -- Seo Sanghyeon
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1211 IronRuby''s Time implementation doesn''t allow this, while MRI does. n = Time.now class RespondToF def to_f 5.0 end end n + RespondToF.new Chronic does something like this in repeaters/repeater_time.rb:76 ~js> -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Seo Sanghyeon > Sent: Wednesday, May 13, 2009 12:16 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Strange type error > > 2009/5/13 Shri Borde <Shri.Borde at microsoft.com>: > > I have seen that error message. The fix was the one-line change in > Protocols.cs in > http://github.com/shri/ironruby/commit/09b25e8c573464dc5868ab2521bd631a > 013527c7. You can apply that change by hand (its not in the main > ironruby repo yet) and see if that fixes the problem. The error message > is somewhat generic, and it may or may not be the same issue. > > It didn''t fix the problem. Probably a different issue. > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core