lib/yasl/dumper.rb in yasl-0.2.1 vs lib/yasl/dumper.rb in yasl-0.2.2

- old
+ new

@@ -70,10 +70,12 @@ dump_structure(klass, for_classes: true) unless klass.class_variables.empty? && klass.instance_variables.empty? end def dump_ruby_basic_data_type_data(obj) class_ancestors_names_include = lambda do |*class_names| - lambda { |obj| class_names.any? { |class_name| obj.class.ancestors.map(&:name).include?(class_name) } } + lambda do |object| + class_names.any? { |class_name| obj.class.ancestors.map(&:name).include?(class_name) } + end end case obj when class_ancestors_names_include['Time'] obj.to_datetime.marshal_dump when class_ancestors_names_include['Date']