Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactor VersionSpace#more_general?.

  • Loading branch information...
commit 781a553c69ff7a57d7be02e1dc2ff3473bd60126 1 parent a5c2600
@arthurschreiber authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 ruby/lib/version_space.rb
View
4 ruby/lib/version_space.rb
@@ -70,8 +70,8 @@ def includes?(a, b)
a == b || a == :*
end
- def more_general?(a, b)
- a.each_with_index.all? { |item, i| includes?(item, b[i]) }
+ def more_general?(hyp1, hyp2)
+ hyp1.zip(hyp2).all?(&method(:includes?))
end
def generalize(hyp1, hyp2)
Please sign in to comment.
Something went wrong with that request. Please try again.