tfpt review "/shelveset:MutableStringCenter;REDMOND\dremy" Comment : Made changes for MutableString.center to pass specs. Included flowing taint correctly, subclassing, changing signature to use object and then doing manual conversion. -------------- next part -------------- A non-text attachment was scrubbed... Name: MutableStringCenter.diff Type: application/octet-stream Size: 6585 bytes Desc: MutableStringCenter.diff URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080628/433b905f/attachment.obj>
I know that at some point, we were always defining multiple overloads in cases like this. For center, I would have probably included both the old signature and the new one: Center(CodeContext, MutableString, int len, [Optional]MutableString padding); Center(CodeContext, MutableString, object len, [Optional]object pad); ...and simply had the more general version do it''s protocol-based conversions and then call the more specific implementation. But I don''t know if that''s still the convention we''re following for the libraries. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dave Remy Sent: Saturday, June 28, 2008 2:21 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: MutableStringCenter tfpt review "/shelveset:MutableStringCenter;REDMOND\dremy" Comment : Made changes for MutableString.center to pass specs. Included flowing taint correctly, subclassing, changing signature to use object and then doing manual conversion.
John Lam (IRONRUBY)
2008-Jun-30 14:39 UTC
[Ironruby-core] Code Review: MutableStringCenter
There''s an overload for FlowTaint() that will accept two from args. If either self *or* padding is tainted the result is tainted, and that''s what that form of FlowTaint() will do. Thanks, -John> -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Sunday, June 29, 2008 4:31 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Code Review: MutableStringCenter > > I know that at some point, we were always defining multiple overloads > in cases like this. For center, I would have probably included both > the old signature and the new one: > > Center(CodeContext, MutableString, int len, [Optional]MutableString > padding); Center(CodeContext, MutableString, object len, > [Optional]object pad); > > ...and simply had the more general version do it''s protocol-based > conversions and then call the more specific implementation. But I > don''t know if that''s still the convention we''re following for the > libraries. > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Dave Remy > Sent: Saturday, June 28, 2008 2:21 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Code Review: MutableStringCenter > > tfpt review "/shelveset:MutableStringCenter;REDMOND\dremy" > Comment : > Made changes for MutableString.center to pass specs. Included > flowing taint correctly, subclassing, changing signature to use object > and then doing manual conversion. > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core