Content of variable changing after read in ruby
|Added at||2016-12-28 01:12|
I am new to ruby (started yesterday) and I'm playing a bit with sinatra to build an API. I encountered an issue which left me without clue:
When I executed this code, I had an error because I tried to parse an empty string with
This reminds me of borrows with rust, but here I wasn't expecting that and can't express it on google to find any documentation. Can anyone explain me what happened and why
For people who have the same problem (we never know), here's the fix:
I heard about IO objects but I still can't go further in my researches.