I just think it makes it a lot less interesting to cover that kind of intro use case, as it's not very compelling exactly because of reactions of "but that's not how I'd do it".
Even more so because the "try" syntax is exaggerated. This works fine:
fax_number.try(:gsub,"+1", "")
And with a new enough version of Ruby, this works too:
fax_number&.gsub("+1","")
You still need to remember to do it of course, but using the "old" syntax makes the problem seem exaggerated.
Even more so because the "try" syntax is exaggerated. This works fine:
And with a new enough version of Ruby, this works too: You still need to remember to do it of course, but using the "old" syntax makes the problem seem exaggerated.