Skip to content

Instantly share code, notes, and snippets.

@zephyr-dev
Created September 20, 2012 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zephyr-dev/3757639 to your computer and use it in GitHub Desktop.
Save zephyr-dev/3757639 to your computer and use it in GitHub Desktop.
Bug with DelegateClass & Array subtraction
astoria:gust (master) ng bm$ irb --simple-prompt
>> require 'delegate'
=> true
>> class Foo < DelegateClass(Object)
>> end
=> nil
>> f = Foo.new(Object.new)
>> array1 = [[f]]
=> [[#<Object:0x007fc92ab72168>]]
>> array2 = [[f]]
=> [[#<Object:0x007fc92ab72168>]]
>> array1 == array2
=> true
>> array1 - array2
=> [[#<Object:0x007fc92ab72168>]]
# ????????
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment