Created
August 5, 2013 20:53
-
-
Save marciojrtorres/6159521 to your computer and use it in GitHub Desktop.
Lidando com a Tipagem Segura em Ruby
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
a = 1 | |
b = "a" | |
c = a + b.to_i # o método to_i converte b para inteiro ("a" vale 0) | |
print c # imprime 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment