I’ve found the -@ operator redefinition in Rails/ActiveSupport:
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/duration.rb#L33
Can you tell me what does it mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-@and+@are simply the method names for unary-and+. If you want to redefine them, invoke them as methods, etc., that’s how you need to refer to them to distinguish them from binary-and+.