Ad
  • Custom User Avatar

    Your if sentence is wrong, change to:

    if s == ("") || s == (nil)
    

    EDIT: Brackets are not necessary.

  • Default User Avatar

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

  • Custom User Avatar

    The error means nil has no a method split, I think perhaps you want use split with a string value, but your code generate some invalid value(nil) , and then call split, and then post the error. isn't it?

    EDIT: I've read the description, it said:

    you should validate that the given string is not empty or null. If so, the method should return:
    "Invalid String!"

    If you forgot to validate the type of the argument?

  • Default User Avatar
  • Custom User Avatar

    A small suggestion is you should tell author that you are using which language ;-)

  • Default User Avatar

    all my tests pass, yet when i try to submit, i get the following:
    STDERR:
    order_word': undefined method split' for nil:NilClass (NoMethodError)
    from block in ' from block in describe'
    from measure' from describe'
    from `
    '

    any suggestions?

  • Default User Avatar

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