Skip to content

Instantly share code, notes, and snippets.

@rentzsch
Created December 29, 2009 03:43
Show Gist options
  • Save rentzsch/265134 to your computer and use it in GitHub Desktop.
Save rentzsch/265134 to your computer and use it in GitHub Desktop.
wolf-mbp:~ wolf$ macirb
irb(main):001:0> a = ['a','b']
=> ["a", "b"]
irb(main):002:0> a.each {|x| puts x}
a
b
=> ["a", "b"]
irb(main):003:0> s = NSSet.setWithArray(a)
=> #<NSCFSet:0x20024e260>
irb(main):004:0> s.each {|x| puts x}
NoMethodError: undefined method `each' for #<NSCFSet:0x20024e260>
from (irb):4:in `<main>'
from core:in `eval:'
from core:in `evaluate:'
irb(main):005:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment