Anonymous | Login | 01-26-2021 02:57 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0007107 | [Squeak] Kernel | minor | always | 07-03-08 11:07 | 04-18-10 22:05 | ||||
Reporter | SergeStinckwich | View Status | public | ||||||
Assigned To | nicolas cellier | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.10.2 | ||||||
Summary | 0007107: 1 printStringBase: 1 generates an infinite loop within Integer>>printStringBase: | ||||||||
Description | Integer>>printStringBase: should be corrected to complain if its argument (base) is less than 2. Fix by Oscar include. | ||||||||
Additional Information | |||||||||
Attached Files |
![]() |
||||||||
|
![]() |
||||||||||||||||
SYSTEM WARNING: Creating default object from empty value SYSTEM WARNING: Creating default object from empty value
|
![]() |
|
(0012323 - 343 - 385 - 769 - 769 - 769 - 769) nicolas cellier 07-03-08 15:05 |
Thank you for the patch Serge, but mind not tri-plicating bug reports. I warned you two mails above in squeak-dev that bug is already reported at http://bugs.squeak.org/view.php?id=6724 [^] and http://bugs.squeak.org/view.php?id=6710 [^] See also http://bugs.squeak.org/view.php?id=6887 [^] for a more efficient printStringBase: algorithm. Cheers |
(0012324 - 599 - 659 - 659 - 745 - 745 - 745) nicolas cellier 07-03-08 19:30 |
0006887 is not only more efficient, it fails when feeded with a bad base. Error Message is not explicit though... However i find it very boring to assert preconditions. Why not do it in each and every method ? 1) because we would prevent unknown future extensions to work 2) because we should not spoil efficiency of kernel methods, and printString is a good candidate for tight loop sends. I would personnally prefer a good comment about base argument prerequisite and a good old Smalltakj-style Debugger session... So I recommend my personal patch, if of course agreed by the community. |
(0012332 - 242 - 353 - 353 - 460 - 460 - 460) matthewf 07-04-08 01:55 edited on: 07-04-08 01:56 |
From 0006724: self should: [2 printStringBase: 1] raise: Error. "it does infinite loop" "Found that in methodFinder with 2. 1. 3." "Funnily, you can even print in non integer base" (Float pi printStringBase: Float pi). '10.0'. |
(0012333 - 191 - 197 - 197 - 304 - 304 - 304) matthewf 07-04-08 01:57 |
From nicolas cellier, in 0006724: IMO the patch should be superseded by 0006887 which does not loop infinitely and which offers a much faster printString / printOn: / printStringBase: / etc... |
(0013326 - 47 - 47 - 47 - 133 - 133 - 133) nicolas cellier 10-03-09 20:25 |
This is resolved in trunk by inclusion of 0006887 |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
87 total queries executed. 48 unique queries executed. |