Last active
August 29, 2015 14:15
-
-
Save zmillman/0301c49d1f3ebfef7aa6 to your computer and use it in GitHub Desktop.
RM Android: Can't .send methods with String names
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
class MainActivity < Android::App::Activity | |
def onCreate(savedInstanceState) | |
super | |
puts self.token | |
# > secret | |
puts self.send :"token" | |
# > secret | |
puts self.send "token" | |
# E/dalvikvm(22221): VM aborting | |
end | |
def token | |
"secret" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment