After 5-6+ years of working with Ruby, I am still periodically reminded of features I’d forgotten about. Today it was the fact that you can override the backtick operator:
>> def `(cmd)
>> puts "Do you really want to #{cmd}?"
>> end
=> nil
>> `rm -rf *`
Do you really want to rm -rf *?
=> nil
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment