Created
April 21, 2011 16:31
-
-
Save timlinquist/934929 to your computer and use it in GitHub Desktop.
Block with local scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my_big_array = (0..10000000000000).to_a | |
| object= some_object.new do | |
| #Do some stuff | |
| #Save block for later use | |
| end | |
| #Block holds a reference to my_big_array until it goes away |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment