[Ironruby-core] Review: misc fixes to MutableStringOps.cs

Daniele Alessandri suppakilla at gmail.com
Thu Jul 16 18:49:03 EDT 2009


I was really starting to feel completely stupid, but then I discovered
that MutableString.RequireNotFrozen (and that self.RequireNotFrozen()
line in MutableString.Translate / MutableString.TrSequezeInPlace)
"appeared" on github after the latest push. I just blindly applied the
same changes that I had prepared the day before without noticing this.
Now I'm relieved: I am only partially stupid ;-)

Anyway I pushed a fix and rebased everything into a single commit.

http://github.com/nrk/ironruby/commit/6f32be3294cbd4a814066d08a30b51f4f6ea5c3a

Thanks,
Daniele


On Fri, Jul 17, 2009 at 00:02, Tomas
Matousek<Tomas.Matousek at microsoft.com> wrote:
> MutableString already has RequireNotFrozen method. You don't need to add it to MutableStringOps.
>
> There already is a check in Translate and TrSequezeInPlace: self.RequireNotFrozen();
>
> Tomas
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde
> Sent: Thursday, July 16, 2009 2:42 PM
> To: ironruby-core at rubyforge.org
> Subject: Re: [Ironruby-core] Review: misc fixes to MutableStringOps.cs
>
> I see. OK then.
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri
> Sent: Thursday, July 16, 2009 2:39 PM
> To: ironruby-core at rubyforge.org
> Subject: Re: [Ironruby-core] Review: misc fixes to MutableStringOps.cs
>
> On Thu, Jul 16, 2009 at 23:25, Shri Borde<Shri.Borde at microsoft.com> wrote:
>
>> Could you update BlockReplaceInPlace in MutableStrinOps.cs to also use RequiresNotFrozenString?
>
> BlockReplaceInPlace seems correct as is to me, String#gsub! raises a RuntimeError instead of a TypeError when self is frozen.
>
> --
> Daniele Alessandri
> http://www.clorophilla.net/blog/
> http://twitter.com/JoL1hAHN
> _______________________________________________
> 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
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



-- 
Daniele Alessandri
http://www.clorophilla.net/blog/
http://twitter.com/JoL1hAHN


More information about the Ironruby-core mailing list