Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000201 [Squeak] Kernel minor always 10-01-04 02:04 10-27-04 15:34
Reporter laza View Status public  
Assigned To MarcusDenker
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000201: bad asInteger Method still in Abstract String?
Description The fix for bug <http://bugs.impara.de/bug_view_page.php?bug_id=0000195>195</a> [^] in update 6275 leaves the bad method asInteger in AbstractString, which still makes

(MultiString from: '-94') asInteger ==> 94

Just wondering.
Additional Information This is also a little bit shorter

asInteger
    "Answer the Integer created by interpreting the receiver as the
    string representation of an integer. Answer nil if no digits, else
    find the first digit and then all consecutive digits after that"
    | start stream |
    start := self findFirst: [:char | char isDigit].
    start isZero ifTrue: [^nil].
    stream := (ReadStream on: self) position: start.
    stream back = $- ifTrue: [stream back].
    ^Integer readFrom: stream
Attached Files  AbstractStringAsIntegerTweak-laza.2.cs [^] (1,743 bytes) 10-01-04 10:09
 AbstractStringAsIntegerTweak-laza.3.cs [^] (2,808 bytes) 10-01-04 10:45

- Relationships

- Notes
(0000189 - 51 - 51 - 51 - 51 - 51 - 51)
laza
10-01-04 10:10

I changed the comment and added a test (for Stef ;)
 
(0000190 - 153 - 189 - 189 - 189 - 189 - 189)
laza
10-01-04 10:45

Forgot about asSignedInteger in String.

Now this contains for AbstractString:

asSignedInteger
asUnsignedInteger
asInteger (calls asSignedInteger)
 
(0000193 - 46 - 46 - 46 - 46 - 46 - 46)
ducasse
10-02-04 11:35

I added the fix of alexander in unstable: 6286
 
(0000535 - 17 - 17 - 17 - 17 - 17 - 17)
MarcusDenker
10-27-04 15:34

fix in in 3.8beta
 

- Issue History
Date Modified Username Field Change
10-01-04 02:04 laza New Issue
10-01-04 10:09 laza File Added: AbstractStringAsIntegerTweak-laza.2.cs
10-01-04 10:10 laza Note Added: 0000189
10-01-04 10:45 laza Note Added: 0000190
10-01-04 10:45 laza File Added: AbstractStringAsIntegerTweak-laza.3.cs
10-02-04 11:35 ducasse Note Added: 0000193
10-02-04 21:16 MarcusDenker Status new => resolved
10-02-04 21:16 MarcusDenker Resolution open => fixed
10-02-04 21:16 MarcusDenker Assigned To  => MarcusDenker
10-27-04 15:34 MarcusDenker Status resolved => closed
10-27-04 15:34 MarcusDenker Note Added: 0000535


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
53 total queries executed.
37 unique queries executed.
Powered by Mantis Bugtracker