Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Last active October 20, 2021 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mehdi-farsi/8cb2bddbb55760af1d983ba2e7c60a5e to your computer and use it in GitHub Desktop.
Save mehdi-farsi/8cb2bddbb55760af1d983ba2e7c60a5e to your computer and use it in GitHub Desktop.
module TemporaryPatch
refine Hash do
def to_s
''
end
end
end
my_ebook = {
ebook: 'Ruby Object Model',
url: 'https://goo.gl/87b1bi',
message: 'feel free to have a look to my new project ;-)'
}
p my_ebook.to_s # => "{\"ebook\":\"Ruby Object Model\", ...}"
using TemporaryPatch
lolcat = { lol: 'cat' }
p lolcat.to_s # => ""
p my_ebook.to_s # => ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment