-
-
Save Papierkorb/8dac484165753b326481b9d8bdd12068 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 gimme : Array(String) # <- Restricted! | |
Dir["*"] | |
end | |
class Foo | |
# vv Store it as enumerable | |
def initialize(@f : Enumerable(String)) | |
end | |
def explode! | |
@f.each{ } # <- Error | |
end | |
end | |
# Trigger it | |
Foo.new(gimme).explode! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment