Thibaut Barrère
2008-Jan-12 09:33 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Hi, if you type "1.0" then enter under rbx on a french machine (or any machine with something different than dot for the decimal separator), you''ll get an exception. I''ve attached a patch which works for me. -- Thibaut -------------- next part -------------- A non-text attachment was scrubbed... Name: float_parsing_culture_dependent.patch Type: application/octet-stream Size: 633 bytes Desc: not available Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080112/61d977ff/attachment.obj
Dino Viehland
2008-Jan-12 10:09 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
FYI we''ve also recently ran into some IronPython bugs which were "culture" dependent as well. In our case these were date/time methods. If anyone''s interested in taking it on it might be interesting to see all the results from running the various tests under alternate "cultures". ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, January 12, 2008 1:33 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Float parsing is culture dependent (patch included) Hi, if you type "1.0" then enter under rbx on a french machine (or any machine with something different than dot for the decimal separator), you''ll get an exception. I''ve attached a patch which works for me. -- Thibaut
Thibaut Barrère
2008-Jan-12 10:53 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
I ran rake specs. Before my patch, it blew up at core/struct/each_pair_spec.rb (the very beginning). After applying the patch, I get this amount of failures: Total failures: 347 out of 1029 examples Not sure how this compares to an english machine ? Running "rake test" also blew up just after Dir tests. Applying the patch managed to let the runner reach third test of StringScanner#new (which blows up and makes rake abort). If someone would like to get the full "rake specs" output, drop me a line (it''s 370kb long - I thought I wouldn''t send it to the list directly). cheers -- Thibaut
John Lam (DLR)
2008-Jan-13 05:30 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Thibaut Barr?re:> Running "rake test" also blew up just after Dir tests. Applying the > patch managed to let the runner reach third test of StringScanner#new > (which blows up and makes rake abort).This is a known bug. I''ve got a shelveset with a fix for it that I''m going to commit with the next set of changes early next week. Thanks, -John
John Lam (DLR)
2008-Jan-13 05:33 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Thibaut Barr?re:> if you type "1.0" then enter under rbx on a french machine (or any > machine with something different than dot for the decimal separator), > you''ll get an exception. > > I''ve attached a patch which works for me.Thanks for sending in this patch! I''ll make sure this makes it into our next push. -John
Peter Bacon Darwin
2008-Jan-13 08:35 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Isn''t this patch hitting Tokenizer.cs inside the IronRuby.dll? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Sunday,13 January 13, 2008 05:33 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Float parsing is culture dependent (patch included) Thibaut Barr?re:> if you type "1.0" then enter under rbx on a french machine (or any > machine with something different than dot for the decimal separator), > you''ll get an exception. > > I''ve attached a patch which works for me.Thanks for sending in this patch! I''ll make sure this makes it into our next push. -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
John Lam (DLR)
2008-Jan-13 16:26 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Yes it is. But its a trivial one-line patch that doesn''t have any clear alternative implementation, so it''s ok. - John Sent from my phone -----Original Message----- From: Peter Bacon Darwin <bacondarwin at googlemail.com> Sent: Sunday, January 13, 2008 12:35 AM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] Float parsing is culture dependent (patch included) Isn''t this patch hitting Tokenizer.cs inside the IronRuby.dll? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Sunday,13 January 13, 2008 05:33 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Float parsing is culture dependent (patch included) Thibaut Barr?re:> if you type "1.0" then enter under rbx on a french machine (or any > machine with something different than dot for the decimal separator), > you''ll get an exception. > > I''ve attached a patch which works for me.Thanks for sending in this patch! I''ll make sure this makes it into our next push. -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Thibaut Barrère
2008-Jan-15 09:58 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
> Thanks for sending in this patch! I''ll make sure this makes it into our next push.Great - is it sure to be included by the end of this month ? (I''m pretty sure so). If it is, I won''t have to include the patch in my article. cheers -- Thibaut
John Lam (DLR)
2008-Jan-15 14:58 UTC
[Ironruby-core] Float parsing is culture dependent (patch included)
Thibaut Barr?re:> Great - is it sure to be included by the end of this month ? (I''m > pretty sure so). > > If it is, I won''t have to include the patch in my article.This is fixed already as part of some other work that Tomas is doing on the tokenizer, so yes - definitely by the end of this month. -John