lib/origami/page.rb in origami-2.0.1 vs lib/origami/page.rb in origami-2.0.2
- old
+ new
@@ -172,10 +172,10 @@
# Iterates over the resources by _type_.
#
def each_resource(type)
target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new)
- rsrc = target[type] and target[type].solve
+ rsrc = (target[type] and target[type].solve)
return enum_for(__method__, type) { rsrc.is_a?(Dictionary) ? rsrc.length : 0 } unless block_given?
return unless rsrc.is_a?(Dictionary)
rsrc.each_pair do |name, obj|