Ad
  • Custom User Avatar

    It shouldn't be possible to require active_support in my opinion. It's not in the standard library.

  • Custom User Avatar

    Indeed doing it in-place causes the tests to fail for me.

    The description should really mention this.

  • Custom User Avatar

    In ruby, nil is considered falsey in a boolean context.

    The expression nil || 0 behaves like false || 0.

    Since The || operator "short-circuits", if @size has a value other than false or nil, it will stop evaluating the expression and return @size. But if it's nil or false, it will continue evaluating it and return 0.

    I hope that makes sense!

  • Custom User Avatar

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

  • Custom User Avatar

    The "Random Tests" section doesn't work correctly for Ruby.

    Testing for {"saiyajin invasion"=>-38}
    It should work for random inputs too - Expected: "It took 252 licks to get to the tootsie roll center of a tootsie pop.", 
    instead got: "It took 214 licks to get to the tootsie roll center of a tootsie pop."
    

    It adds the positive values from env but doesn't subtract the negative ones.

    My solution passes all the Basic Tests.

  • Custom User Avatar

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

  • Custom User Avatar

    Note: this only works because of a lack of test coverage

    a = "abcd"
    b = "abe"
    
    solution(a, b)
    # => "abcdabeabcd"
    

    "abe" is greater than "abcd", but also shorter.