Re:The Rule of 2
by steveklabnik on Saturday August 10, 2019 @10:55AM
(#20662380)
It’s in Ruby as well, inherited from Perl. It doesn’t get much use though.
[ Parent
| on HN ]
It's used in Rails to reduce the likelihood of un-sanitized user input in SQL fragments [1]. I think it would see a lot more use if additional input sources were marked as tainted [2].
[1] https://api.rubyonrails.org/classes/ActiveRecord/Base.html#c...
[2] http://www.jkfill.com/2012/03/10/preventing-mass-assignment-...