Skip to content

Instantly share code, notes, and snippets.

@melborne
Created November 30, 2012 10:05
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 melborne/4174909 to your computer and use it in GitHub Desktop.
Save melborne/4174909 to your computer and use it in GitHub Desktop.
# encoding: UTF-8
∞= 1.0/0
(1..∞).lazy.map {|i| Statue.new(i) }
.select {|statue| statue.of_liberty? }
.take(100).send(:george)
# ~> YouLazzyError: undefined method ‘lazy’ for 1..Infinity:Range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment