5 kyu
Split hash by key(s)
374 of 376OlgaGr
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Great kata.
Doesn't this contradict the last test case given? I was expecting to only have to raise an exception if there was no valid keys in the args, not if any single one of the args was an invalid key.
I had this problem too. Either the instructions or the test case needs to be fixed. Kata authors need to be aware that this makes their katas annoying and unenjoyable. Please be explicit about what you expect out of our code and be consistent in your test cases!!
The instruction says: 'If hash does not contain at least one of the key given as an argument, method should raise an exception.'. In the test I gave two keys: one is correct (it is present in the hash), the second is not present in the hash. So at least one of the given key is not present in the hash. I don't see error in the description. Do you think that description:
'If any of the keys given as an argument is not present in the hash, the method should raise the an exception'.
will be more clear?
hh9 - it's really not so easy to create kata and make it clear for everyone. I see that you haven't create any yet. Please try and you will see :)
Yes, this is much clearer. Although these might be slightly better:
or
Thanks for the response!
Cool kata, keep up the good work.
Thank you! I'm glad you like it :)
This comment has been hidden.
Agree. It makes more sense this way.