Created
August 25, 2011 21:18
-
-
Save xenda/1172000 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
# Original | |
(self.index('"') == 2 || self.index("'") == 2) ? true : false | |
# First iteration | |
[self.index('"'),self.index("'")].include? 2 ? true : false | |
# Second iteration | |
[self.index('"'),self.index("'")].include? 2 # de por sí ya eso retorna true o false | |
# Third iteration, self isn't needed | |
[index('"'),index("'")].include? 2 | |
def third_char_symbol? | |
[index('"'), index("'")].include? 2 | |
end | |
puts "Hey!" if third_char_symbol? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment