Skip to content

Instantly share code, notes, and snippets.

@twerth
Last active December 30, 2015 17:39
Show Gist options
  • Save twerth/7862187 to your computer and use it in GitHub Desktop.
Save twerth/7862187 to your computer and use it in GitHub Desktop.
RubyMotion - Comparing some objects to same object in WeakRef fails tickets 1420 filed
(main)> a = ‘test’
=> "test"
(main)> b = WeakRef.new(a)
=> "test"
(main)> b == a
=> true
(main)> a == b
=> true
(main)> c = UIViewController.alloc.init
=> #<UIViewController:0×963c630>
(main)> d = WeakRef.new(c)
=> #<UIViewController:0×963c630>
(main)> c == d
=> false
(main)> d == c
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment