Re: [Rails-core] Deprecate strip_heredoc?

2019-06-09 Thread Godfrey Chan
Oops. Hit sent before completing the email. Anyway, I was thinking it may be a good idea to take keyword arguments to precise control the amount of indentation/tab vs space, etc to override the auto-detection, in the rare cases where it is needed. For example, when processing an indented

Re: [Rails-core] Deprecate strip_heredoc?

2019-06-09 Thread Godfrey Chan
+1 to what Matthew said If we are switching the use case of the method to stripping indentation, I wonder if we should just call it `outdent`. By default it could auto detect the indentation like it does now, but there were a couple of times I was processing strings with known indentation that I

Re: [Rails-core] Deprecate strip_heredoc?

2019-06-08 Thread Matthew Draper
> The squiggly-heredoc operator can't be applied to an already existing string. > That is the only case were you still need strip_heredoc, so unless we add a > way to strip heredocs from an already existent string object to Ruby we can't > deprecated it. How about we rename it to something

Re: [Rails-core] Deprecate strip_heredoc?

2019-06-08 Thread Rafael Mendonça França
The squiggly-heredoc operator can't be applied to an already existing string. That is the only case were you still need strip_heredoc, so unless we add a way to strip heredocs from an already existent string object to Ruby we can't deprecated it. See

Re: [Rails-core] Deprecate strip_heredoc?

2019-06-08 Thread Xavier Noria
+1 too. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [Rails-core] Deprecate strip_heredoc?

2019-06-08 Thread George Claghorn
+1 for deprecating. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to

[Rails-core] Deprecate strip_heredoc?

2019-06-08 Thread Simon Perepelitsa
The new squiggly-heredoc syntax is available since Ruby 2.3, which does the same thing as "strip_heredoc" method. I was going to submit a documentation change to mention the new Ruby syntax, but now I'm doubting if there is any good use case for the method, except for backwards compatibility.