Last active
October 20, 2021 07:01
-
-
Save mehdi-farsi/8cb2bddbb55760af1d983ba2e7c60a5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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