From: William Morgan Date: Fri, 4 Sep 2009 15:14:07 +0000 (-0400) Subject: bugfix in yaml serialization X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=83282fc35c17fa1988bb5a3b2158a3eb34ecdfb7;p=sup bugfix in yaml serialization Objects that don't respond to before_marshal were being turned into false. Whoops! --- diff --git a/lib/sup.rb b/lib/sup.rb index 2351fa5..aa8079c 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -88,8 +88,10 @@ module Redwood def save_yaml_obj o, fn, safe=false o = if o.is_a?(Array) o.map { |x| (x.respond_to?(:before_marshal) && x.before_marshal) || x } + elsif o.respond_to? :before_marshal + o.before_marshal else - o.respond_to?(:before_marshal) && o.before_marshal + o end if safe