Forum: IronRuby Bug with chomp in IronRuby RC2

Posted by Martin Smith (Guest)
on 2010-02-23 19:45
(Received via mailing list)
Hello,

Here's a bug we've run into with chomp.  If you run the following code:

abc = "/toheunthª¶˙¨˙≥˜≥˜†˙≤ß߆˙ƒƒƒƒ".to_clr_string
abc.chomp('\\').chomp('/')
puts abc

(where abc is really just any string with non-english characters). and
you'll get the error:

IronRuby.Libraries:0:in `EndsWith': Array index is out of range. 
(IndexError)
  from IronRuby.Libraries:0:in `InternalChomp'
  from :0:in `chomp'
  from /Users/martin/Kode/rbtest/test-intl.rb:3

If you remove the to_clr_string everything works fine.

Otherwise RC2 looks pretty great! It seems fater and better!

Thanks,
Martin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.