Skip to content

Instantly share code, notes, and snippets.

@glarizza
Created December 5, 2012 19:15
Show Gist options
  • Save glarizza/4218633 to your computer and use it in GitHub Desktop.
Save glarizza/4218633 to your computer and use it in GitHub Desktop.
Ruby 1.9.3:
irb(main):001:0> string = 'foo'
=> "foo"
irb(main):002:0> string.each { |bar| puts bar }
NoMethodError: undefined method `each' for "foo":String
from (irb):2
from /opt/boxen/rbenv/versions/1.9.3/bin/irb:12:in `<main>'
Ruby 1.8.7:
>> string = 'foo'
=> "foo"
>> string.each { |bar| puts bar }
foo
=> "foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment