-
-
Save paulcsmith/ad68b6c1f22ac42a8bedd37a341d1ae0 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
name = "String" | |
macro put_class(var) | |
puts {% typeof(var).stringify %} | |
end | |
# why does this work? | |
p typeof(name) # prints String | |
# But this can't work because `typeof` doesn't work in a macro? | |
# put_class(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment