This is with 2.3.3.  I noticed that #lineDelimiter fails when sent to
the class it's defined in, CharacterArray:

    st> CharacterArray lineDelimiter!
    Object: CharacterArray new: 1 "<-0x5c60cd20>" error: Invalid
    argument : argument must be between 0 and 4294967295
    SystemExceptions.ArgumentOutOfRange(Exception)>>#signal
    SystemExceptions.ArgumentOutOfRange(Exception)>>#signal:
    SystemExceptions.ArgumentOutOfRange class>>#signalOn:mustBeBetween:and:
    CharacterArray(Object)>>#checkIndexableBounds:put:
    CharacterArray(Object)>>#at:put:
    CharacterArray class(ArrayedCollection class)>>#with:
    CharacterArray class>>#lineDelimiter

Seeing that it works with most subclasses, I guess it makes sense to put
the method in a common parent class, but there's no documentation that
says "don't use this here, use with String (or other subclass) instead".

Also, #addAll: doesn't work on Dictionaries:

    st> Smalltalk at: #a put: (Dictionary new add: 1 -> 'one'; yourself)!
    st> Smalltalk at: #b put: (Dictionary new add: 2 -> 'two'; yourself)!
    st> a addAll: b!
    Object: 'two' error: did not understand #key
    MessageNotUnderstood(Exception)>>#signal
    String(Object)>>#doesNotUnderstand:
    Dictionary>>#add:
    optimized [] in Collection>>#addAll:
    [] in Dictionary>>#do:
    Dictionary(HashedCollection)>>#do:
    Dictionary>>#do:
    Dictionary(Collection)>>#addAll:

I believe it should iterate directly over elements and not their values.

Best,
Jānis



_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to