Ad
  • Custom User Avatar

    Why wouldn't you allow alias or alias_method. It's like you're trying to teach people how to do it the wrong way just to sate your desire to show how to reopen a class and define a method. The exercise could have been adjusted to require some additional behavior above just redirecting to an existing method wholesale.

  • Custom User Avatar

    This seemed like a really dull, aimless exercise.

  • Custom User Avatar

    This didn't work for me because many of the tests are random and Ruby's stdlib Prime will return true for negative numbers when the absolute value is prime, but the test is not expecting it.

  • Custom User Avatar

    I'd personally wrap the n * c in parantheses, since a lot of people don't have order of operation precedence memorized and it could save them a few seconds reading it.