Skip to content

Instantly share code, notes, and snippets.

@tbuehlmann
Created September 26, 2018 07:56
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 tbuehlmann/d648decd7590c786e0cd47e53ac037bc to your computer and use it in GitHub Desktop.
Save tbuehlmann/d648decd7590c786e0cd47e53ac037bc to your computer and use it in GitHub Desktop.
'foo' + 42 # => TypeError: no implicit conversion of Integer into String
class Integer
def to_str
to_s
end
end
'foo' + 42 # => 'foo42'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment