Skip to content

Instantly share code, notes, and snippets.

@lukeledet
Created January 26, 2012 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukeledet/1684143 to your computer and use it in GitHub Desktop.
Save lukeledet/1684143 to your computer and use it in GitHub Desktop.
# String#+ appends a string, ¿por qué no los dos?
class String
def - s
self.dup[0...self.rindex(s)||self.length]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment