The trouble is that MutableStrings and CLR Strings are (going to be, if not already) quite different creatures. For a start the CLR string is always UTF-16, while the MutableString is basically just an array of bytes, which can be interpreted in different ways depending on the K-Code you are using.
In order to compare these two kinds of strings you need an intelligent comparer that understands what locale you are working against. I understand that Tomas is working on a version of MutableString that has a hybrid internal organisation to enable easy cooperation with CLR strings while maintaining compatibility with Ruby strings (hopefully without losing out in performance). Pete From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Eichert Sent: Thursday,08 May 08, 2008 14:06 To: [email protected] Subject: Re: [Ironruby-core] Forgetting MutableString I wasn't a fan of all the calls to to_s either so I put together a small patch (which undoubtedly is nothing like what the actual fix is going to be) to relieve my pains. The bug I submitted along with a patch I made locally can be found at: http://rubyforge.org/tracker/?func=detail <http://rubyforge.org/tracker/?func=detail&aid=19873&group_id=4359&atid=1679 8> &aid=19873&group_id=4359&atid=16798 Cheers, Steve On Thu, May 8, 2008 at 8:55 AM, Robert Brotherus <[EMAIL PROTECTED]> wrote: I would guess that IR-teams plan is to implement auto-wrapping of strings coming from DotNet as MutableStrings? At least I hope so since that would get rid of my code of extensive to_s calls from parameters / values coming from C# :-) Robert Brotherus Software architect Napa Ltd _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Bacon Darwin Sent: 8. toukokuuta 2008 15:47 To: [email protected] Subject: [Ironruby-core] Forgetting MutableString I keep forgetting to wrap up CLR strings in MutableStrings when returning strings retrieved from calls to .NET Framework library methods. _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
