Last active
March 31, 2020 21:40
-
-
Save enebo/4651572a54cb9c6cefdc6fbd43d1bcde to your computer and use it in GitHub Desktop.
This file contains 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
def [](a, &foo) | |
yield a, "wot???" | |
nil | |
end | |
public :[] | |
def []=(a, b, &foo) | |
yield a, b | |
end | |
self[1, &proc { |*a| p a }] ||= 2 | |
headius
commented
Mar 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment