Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class Hash def to_yaml( opts = {} ) YAML::quick_emit( self, opts ) do |out| out.map( taguri, to_yaml_style ) do |map| keys = self.keys.sort_by {|a| a.to_s } keys.each do |k| map.add( k, self[k] ) end end end end end
This paste will be private.
From the Design Piracy series on my blog: