Paul McMahon <pm / ubit.com> writes: > > You might consider using an array of namespace objects instead of parallel > arrays > > class Namespace > attr_reader :prefix, :uri > def initialize(prefix, uri) > @prefix = prefix > @uri = uri > end > end > > namespaces = [ Namespace.new("prefix", "uri"), ...] > > then your code becomes something like: > > matching_namespace = namespaces.find {|namespace| namespace.prefix == > prefix) > return matching_namespace ? matching_namespace.uri : nil Good point. I suspect in this case a plain old Hash might do wonders to simplify the problem... Carl.