[Ironruby-core] Experimentation

Curt Hagenlocher curt at hagenlocher.org
Sun Oct 14 16:10:27 EDT 2007


On 10/14/07, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:

>  Yes, you're right it seems redundant but unfortunately it's not. The
> problem is that our (i.e. DLR's) NotNull attribute is currently not
> understood by Spec# (static verifier). It's only influencing the overload
> resolution, nothing else. So Spec# would complain that you're e.g.
> "dotting thru" a variable that might be null.
>
Ah, I didn't realize there was a program looking directly at the source
code.

>   If you can define a macro in your favorite text editor, this is the
> right use of that feature.
>
:)


>   Yes, we accept contributions to libraries, i.e. to
> IronRuby.Libraries.dll. Although MutableString class will stay where it
> is, Ruby method implementations for MutableString will soon get factored out
> to the Libraries assembly. Hence we could take your contribution then if it
> will be correct and efficient.
>
I see that the operations have now been factored out into
MutableStringOps.cs, presumably in preparation for this migration.  If it's
not premature, there's an updated patch file (is that the preferred format?)
at http://hagenlocher.org/software/MutableStringOps.scan.patch.txt which
incorporates implementations for scan, upto, swapcase and swapcase!, as well
as tests for all of these changes in test.string.rb.

These days, i18n is at the top of my brain as my company works on
internationalizing its product.  It's charmingly quaint to see that IronRuby
(and presumably Ruby) have explicit tests against the ranges 'A'-'Z' and
'a'-'z' for purposes of checking and changing the case of individual letters
:).

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071014/ba693b94/attachment.html 


More information about the Ironruby-core mailing list