News for hackers. Stuff that matters.
Re:Hyperpolyglot: PHP, Perl, Python, Ruby by jfarmer on Saturday August 13, 2011 @08:35PM (#2882405)
Yeah, #succ is something else. For example, if your object supports #succ then you can use it in ranges.

e.g., (1..10), but also ("apple".."kiwis") or ('A'..'Z').

In this case, String#succ returns a string with the last alphanumeric character transformed into its successor, e.g., "apple".succ == "applef".

The only time I've used it is implementing the range interface; I've never called it directly, let alone to increment an integer.

Re:Hyperpolyglot: PHP, Perl, Python, Ruby by neutronicus on Saturday August 13, 2011 @08:44PM (#2882418)
I assume you mean "apple".succ == "applf" ?
Re:Hyperpolyglot: PHP, Perl, Python, Ruby by jfarmer on Monday August 22, 2011 @02:49PM (#2913582)
Yes