because gemstone's copyReplaceFrom:to:with: silently takes '' as the
with but doesnt do the replacement, anything that relies on it like... copyReplaceAll:with:asTokens: ends up in an endless loop if you do something like: '5,347' copyReplaceAll: ',' with: '' asTokens: false. Shouldnt this at least throw an error in copyReplaceFrom:to:with: if you pass it something like ''? |
Sean Allen wrote:
> because gemstone's copyReplaceFrom:to:with: silently takes '' as the > with but doesnt do the replacement, > anything that relies on it like... copyReplaceAll:with:asTokens: ends > up in an endless loop if you do something like: > > '5,347' copyReplaceAll: ',' with: '' asTokens: false. > > Shouldnt this at least throw an error in copyReplaceFrom:to:with: if > you pass it something like ''? Sean, sounds like a bug to me as well ... could you submit this over on http://code.google.com/p/glassdb/issues/list... Thanks, Dale |
While I haven't had a moment to look at the
copyReplaceAll:with:asTokens: method, it otherwise sounds like a known bug, #40550, in which copyReplacefrom:to:with: returned the receiver for an empty with: argument. Bug 40550 is fixed in version 2.4.3. Lisa Almarode GemStone Technical Support Dale Henrichs wrote: > Sean Allen wrote: >> because gemstone's copyReplaceFrom:to:with: silently takes '' as the >> with but doesnt do the replacement, >> anything that relies on it like... copyReplaceAll:with:asTokens: ends >> up in an endless loop if you do something like: >> >> '5,347' copyReplaceAll: ',' with: '' asTokens: false. >> >> Shouldnt this at least throw an error in copyReplaceFrom:to:with: if >> you pass it something like ''? > > Sean, > > sounds like a bug to me as well ... could you submit this over on > http://code.google.com/p/glassdb/issues/list... > > Thanks, > > Dale |
When was 2.4.3 released?
On Wed, Jun 2, 2010 at 7:38 PM, Lisa Almarode <[hidden email]> wrote: > While I haven't had a moment to look at the copyReplaceAll:with:asTokens: > method, it otherwise sounds like a known bug, #40550, in which > copyReplacefrom:to:with: returned the receiver for an empty with: argument. > Bug 40550 is fixed in version 2.4.3. > > Lisa Almarode > GemStone Technical Support > > Dale Henrichs wrote: >> >> Sean Allen wrote: >>> >>> because gemstone's copyReplaceFrom:to:with: silently takes '' as the >>> with but doesnt do the replacement, >>> anything that relies on it like... copyReplaceAll:with:asTokens: ends >>> up in an endless loop if you do something like: >>> >>> '5,347' copyReplaceAll: ',' with: '' asTokens: false. >>> >>> Shouldnt this at least throw an error in copyReplaceFrom:to:with: if >>> you pass it something like ''? >> >> Sean, >> >> sounds like a bug to me as well ... could you submit this over on >> http://code.google.com/p/glassdb/issues/list... >> >> Thanks, >> >> Dale > > |
GemStone/S 64 Bit was released at the end of April.
There's (finally) a bugnote published for this, with the fix code: http://support.gemstone.com/gemstone_s/learning_center/bug_notes/GS64/40550.html Regards Lisa Almarode Sean Allen wrote: > When was 2.4.3 released? > > > On Wed, Jun 2, 2010 at 7:38 PM, Lisa Almarode <[hidden email]> wrote: >> While I haven't had a moment to look at the copyReplaceAll:with:asTokens: >> method, it otherwise sounds like a known bug, #40550, in which >> copyReplacefrom:to:with: returned the receiver for an empty with: argument. >> Bug 40550 is fixed in version 2.4.3. >> >> Lisa Almarode >> GemStone Technical Support >> >> Dale Henrichs wrote: >>> Sean Allen wrote: >>>> because gemstone's copyReplaceFrom:to:with: silently takes '' as the >>>> with but doesnt do the replacement, >>>> anything that relies on it like... copyReplaceAll:with:asTokens: ends >>>> up in an endless loop if you do something like: >>>> >>>> '5,347' copyReplaceAll: ',' with: '' asTokens: false. >>>> >>>> Shouldnt this at least throw an error in copyReplaceFrom:to:with: if >>>> you pass it something like ''? >>> Sean, >>> >>> sounds like a bug to me as well ... could you submit this over on >>> http://code.google.com/p/glassdb/issues/list... >>> >>> Thanks, >>> >>> Dale >> |
In reply to this post by SeanTAllen
2.4.3 was releaed at the beginning of May ... I have started work on a
2.4.3.1 that will include 1.0-beta.8... Dale Sean Allen wrote: > When was 2.4.3 released? > > > On Wed, Jun 2, 2010 at 7:38 PM, Lisa Almarode <[hidden email]> wrote: >> While I haven't had a moment to look at the copyReplaceAll:with:asTokens: >> method, it otherwise sounds like a known bug, #40550, in which >> copyReplacefrom:to:with: returned the receiver for an empty with: argument. >> Bug 40550 is fixed in version 2.4.3. >> >> Lisa Almarode >> GemStone Technical Support >> >> Dale Henrichs wrote: >>> Sean Allen wrote: >>>> because gemstone's copyReplaceFrom:to:with: silently takes '' as the >>>> with but doesnt do the replacement, >>>> anything that relies on it like... copyReplaceAll:with:asTokens: ends >>>> up in an endless loop if you do something like: >>>> >>>> '5,347' copyReplaceAll: ',' with: '' asTokens: false. >>>> >>>> Shouldnt this at least throw an error in copyReplaceFrom:to:with: if >>>> you pass it something like ''? >>> Sean, >>> >>> sounds like a bug to me as well ... could you submit this over on >>> http://code.google.com/p/glassdb/issues/list... >>> >>> Thanks, >>> >>> Dale >> |
Dale Henrichs wrote:
> 2.4.3 was releaed at the beginning of May ... I have started work on a > 2.4.3.1 that will include 1.0-beta.8... > > Dale > > Sean Allen wrote: >> When was 2.4.3 released? >> >> >> On Wed, Jun 2, 2010 at 7:38 PM, Lisa Almarode <[hidden email]> wrote: >>> While I haven't had a moment to look at the copyReplaceAll:with:asTokens: >>> method, it otherwise sounds like a known bug, #40550, in which >>> copyReplacefrom:to:with: returned the receiver for an empty with: argument. >>> Bug 40550 is fixed in version 2.4.3. >>> >>> Lisa Almarode >>> GemStone Technical Support >>> >>> Dale Henrichs wrote: >>>> Sean Allen wrote: >>>>> because gemstone's copyReplaceFrom:to:with: silently takes '' as the >>>>> with but doesnt do the replacement, >>>>> anything that relies on it like... copyReplaceAll:with:asTokens: ends >>>>> up in an endless loop if you do something like: >>>>> >>>>> '5,347' copyReplaceAll: ',' with: '' asTokens: false. >>>>> >>>>> Shouldnt this at least throw an error in copyReplaceFrom:to:with: if >>>>> you pass it something like ''? >>>> Sean, >>>> >>>> sounds like a bug to me as well ... could you submit this over on >>>> http://code.google.com/p/glassdb/issues/list... >>>> >>>> Thanks, >>>> >>>> Dale > > 1.0-beta.8.1 release with the bugfix, otherwise I'll plan on including a fix in 1.0-beta.9. Tracking this with Issue 121 (http://code.google.com/p/glassdb/issues/detail?id=121) bugfix: category: 'Copying' method: SequenceableCollection copyReplaceFrom: startIndex to: stopIndex with: aSequenceableCollection "Returns a copy of the receiver in which all elements in the receiver between indexes startIndex and stopIndex inclusive have been replaced by those contained in aSequenceableCollection." | selfSize seqCollSize targetIndex result | startIndex > stopIndex ifTrue: [^startIndex _error: #rtErrBadCopyFromTo args: #[stopIndex]]. seqCollSize := aSequenceableCollection size. result := self species new. targetIndex := 1. startIndex > 1 ifTrue: [self copyFrom: 1 to: startIndex - 1 into: result startingAt: targetIndex. targetIndex := targetIndex + startIndex - 1]. 0 < seqCollSize ifTrue: [ aSequenceableCollection copyFrom: 1 to: seqCollSize into: result startingAt: targetIndex. ]. targetIndex := targetIndex + seqCollSize. selfSize := self size. stopIndex < selfSize ifTrue: [self copyFrom: stopIndex + 1 to: selfSize into: result startingAt: targetIndex]. ^result % Dale |
Free forum by Nabble | Edit this page |