Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    is it common to mutate function arguments in ruby?

    I'm coming from the JS world where immmutability is the key to sanity

    EDIT: think i got it - we can sort and reverse in place since chars returns a new array. No args are being mutated

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Did you ever figure out what was happening with this? Why was it blowing up with large numbers?

  • Custom User Avatar

    Maybe I'm mistaken... but isn't it still monkey patching to reopen the class and alias a method?

  • Custom User Avatar

    I disallowed alias_method because I wanted the users to use monkeypatching.
    On the other hand, I don't want them to actually provide their own implementation of upcase because it's beyond the point of this kata, ie. to show a Ruby language feature.

  • Custom User Avatar

    It's just to use monkeypatching and not to provide your own version of upcase. :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I agree with others that just calling upcase should be disallowed.
    Especially since you disallowed the use of alias_method.
    If you are going to disallow this then you should disallow upcase because otherwise all you are doing is aliasing in long hand.

  • Custom User Avatar

    I am geting the same for reverse NoMethodError: undefined method reverse' for 0:Fixnum`

  • Custom User Avatar

    I agree it should return a Rational not nil especially since this is meant to emulate the ** operator.

  • Custom User Avatar

    I did the same thing although there is no need to switch back to int 0.0 == 0 => true

  • Custom User Avatar

    Am I the only one that used parallel assignment for this?

  • Custom User Avatar

    I agree since I have seen solutions using an inclusive range which according to the Kata is incorrect. Seems strange that it is a spec but is untested.

  • Custom User Avatar

    When I try to submit I keep getting "Failed to construct test fixture properly. Did you provide test cases?" Any idea why this is happening?

    For Some reason this also occurs when I add Test.assert_equals(solution("MCMXC"),1990) to my tests.
    All other tests work fine but as soon as I add this test I get the same error.

    My solution seems to work for all of my tests and I would really like to submit it as I love seeing other peoples solutions but I don't want to forfeit which is currently my only option.

    Please resolve this.

  • Loading more items...