Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def const_path_defined?(name) if name[0,2] == "::" then current = Object pieces = name[2,(name.length - 2)].split("::") else current = self pieces = name.split("::") end while current const = current found = pieces.all? do |piece| piece = normalize_const_name(piece) const = const.constants_table[piece] const end return true if found current = current.direct_superclass end return false end
This paste will be private.
From the Design Piracy series on my blog: