From: schneik@... Date: 2000-04-26T02:43:49-05:00 Subject: [ruby-talk:02579] Re: String.succ Hi, Matz writes: # on 00/04/26, Dave Thomas writes: # # |Should # | # | "\377".succ # -> "\000" # | # |I _think_ I'd expect "\001\000". # | # |Similarly, "".succ returns "\377", because it uses a carry that was # |never set. # | # |In reality, these are pathological, so I wouldn't call them # |bugs. However, I'm wondering how to document them. # # Ok, I define as following: # # "".succ == "" # "\377".succ == "\001\000" Maybe I missed something, but for simplicity, consistency, least surprise, ease of remembering, why not: "".succ == "\000" Conrad Schneiker (This note is unofficial and subject to improvement without notice.)