[Ironruby-core] Forgetting MutableString
Peter Bacon Darwin
bacondarwin at googlemail.com
Thu May 8 09:29:42 EDT 2008
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: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Steve Eichert
Sent: Thursday,08 May 08, 2008 14:06
To: ironruby-core at rubyforge.org
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 <robert.brotherus at napa.fi>
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: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin
Sent: 8. toukokuuta 2008 15:47
To: ironruby-core at rubyforge.org
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
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080508/47f9952d/attachment-0001.html>
More information about the Ironruby-core
mailing list