This throws me a SystemStackError in 1.9.2 Ruby (but works in Rubinius):
class Fixnum
def +(other)
self + other * 2
end
end
but there is no super for + (based on other errors).
How can I access the original + functionality?
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.
Use
alias_method. AliasFixnum‘s+to something else, then refer to it in the new+: