mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed a bug in Array#difference.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user