loading
open in
main.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
puts
p [:a] - [:b]
p [:a] - [1]

class Any
end

puts
p [Any.new, Any.new].uniq
p [Any.new] - [Any.new]

class Any
  def eql?(*)
    true
  end
end

puts
p [Any.new, Any.new].uniq
p [Any.new] - [Any.new]

class Any
  def hash
    nil.hash
  end
end

puts
p [Any.new, Any.new].uniq
p [Any.new] - [Any.new]

puts
nil
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]