Ad
  • Default User Avatar

    \b matches word boundaries.

  • Default User Avatar

    pattern between // is a regular expression pattern that matches on to the string object.
    in this case the pattern is 0*$ which is:
    0 - is the character 0
    * - is whats called quntifer, it stating how many times should the character on the
    left side of it should be counted. * - zero or more times.
    $ - stating that that you want to match to th end of the current string.

  • Custom User Avatar

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

  • Custom User Avatar

    Since the two arguments are both booleans we can use them directly when comparing. This solution asks if I'm employed and (&&) not (!) on vacation. Since this is Ruby, the last executed line in a method is automatically returned.