Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7812781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:37:35+00:00 2026-06-02T04:37:35+00:00

So my research on this seems to indicate that the there is something in

  • 0

So my research on this seems to indicate that the there is something in here that is causing infinite recursion, but I’m not sure waht it is. Can anyone point out what I’m doing wrong?

def initialize(_val)
    @start_value = _val
end

def method_missing(method, *args)
    if method.starts_with?("plus") then
        num = method[4 .. method.length]
        if (/^[\d]+(\.[\d]+){0,1}$/ === num) then
            number = Integer(num)
            self.class_eval("def #{method}; return @start_value + x; end")
        self.plus(number)
        else
            super.method_missing
        end
    else
        super.method_missing
    end
end

end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:37:36+00:00Added an answer on June 2, 2026 at 4:37 am

    You shouldn’t do this:

    super.method_missing
    

    You want this:

    super
    

    In both cases you’d be using super with no args, which is the proper way to call an ancestor’s version of a method, in this case method_missing. But in your version you’re then calling method_missing redundantly on the result, which is where it gets all infinitey.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done some research on this question (both via google and on here), but
I have been doing some research and this seems to be not possible unless
All my research so far seems to indicate it is not possible to do
Despite substantial research and many posts that seem to indicate this isn't too tough,
All the research I've done seems to indicate that if I simply call DataBind()
This makes no sense to me. I've been trying to research this, but I
Sorry for the length of this, but more info is usually better than not
Note this is not a duplicate of this similar but different question ! My
After a small amount of research it seems that TCP MD5 Signatures are enabled
Before I begin, I guess this may not be strictly programming related but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.