lib/cukedep/feature-model.rb in cukedep-0.2.00 vs lib/cukedep/feature-model.rb in cukedep-0.2.01
- old
+ new
@@ -6,11 +6,11 @@
require 'pathname'
module Cukedep # This module is used as a namespace
# The internal representation of a set of feature files.
# Dependencies: use topological sort
-# TSort module http://ruby-doc.org/stdlib-1.9.3/libdoc/tsort/rdoc/TSort.html
+# TSort module http://ruby-doc.org/stdlib-2.6/libdoc/tsort/rdoc/index.html
# See also: Is this topological sort in Ruby flawed?
class FeatureModel
FeatureDependencies = Struct.new(:dependee, :dependents)
# Helper class used internally by FeatureModel class.
@@ -63,9 +63,10 @@
selection = theIds.each_with_object([]) do |an_id, sub_result|
found_feature = features_by_ids[an_id]
if found_feature.nil?
raise StandardError, "No feature file with identifier '#{an_id}'."
end
+
sub_result << found_feature
end
return selection
end