Last active
March 9, 2024 17:57
-
-
Save dorkrawk/cab945e6f435387667ff16c0e65cb544 to your computer and use it in GitHub Desktop.
Testing emjoi usage in Crystal.
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
# this works! | |
π = 8 | |
puts π | |
#> 8 | |
# this doesn't work | |
class π | |
def eat | |
puts "π" | |
end | |
end | |
pizza = π.new | |
pizza.eat | |
#> Syntax error in eval:4: expecting token 'CONST', not 'π' | |
# This does work, though! | |
class Binaryπ³ | |
def insert | |
# do stuff | |
end | |
end | |
π³ = Binaryπ³.new | |
π³.insert | |
# tested with Crystal 0.24.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment