lib/review/catalog.rb in review-2.1.0 vs lib/review/catalog.rb in review-2.2.0
- old
+ new
@@ -33,15 +33,15 @@
@yaml["CHAPS"].map {|entry|
if entry.is_a? Hash
entry.keys
end
- }.flatten.reject{|entry| entry.nil?}.join("\n")
+ }.flatten.compact.join("\n")
end
def parts_with_chaps
return "" unless @yaml["CHAPS"]
- @yaml["CHAPS"].flatten.reject{|entry| entry.nil?}
+ @yaml["CHAPS"].flatten.compact
end
def appendix
return "" unless @yaml["APPENDIX"]
@yaml["APPENDIX"].join("\n")