From: Xavier Noria Date: 2007-08-07T04:25:44+09:00 Subject: Re: Determining the common prefix for several strings El Aug 6, 2007, a las 5:13 PM, Stefan Rusterholz escribi�: > Wow, I'm surprised nobody had the idea of simply using Array#abbrev, > which is included in the stdlib. There's no guarantee you can obtain the maximum common prefix from its output, because it computes _unambiguous_ prefixes: %w{ item1 item2 }.abbrev => {"item1"=>"item1", "item2"=>"item2"} See, no "item" there, you end up basically with the information you had before the call. -- fxn