Fixed a bug in Array#difference.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-10-12 12:38:25 +09:00
parent 265034134a
commit 67ea80b2bd
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -133,9 +133,9 @@ class Array
# preserved from the original array.
#
def difference(*args)
ary = self.dup
ary = self
args.each do |x|
ary = self - x
ary = ary - x
end
ary
end