-
-
Notifications
You must be signed in to change notification settings - Fork 556
[run-length-encoding] test case conflicts with description #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @daveyarwood for pointing this out! I added that description trying to fix #238, but as you pointed out my description was not complete. I think the correct thing to do would be to update the description to say something like: |
I wonder if that would create more work for the individual language repos? The example solutions would all need to be updated to handle spaces in the input. |
Tracks that have already implemented this exercise should have been taking the existing whitespace into account (assuming that they're following the canonical data). Therefore, I think it makes more sense to not modify the canonical data and to update the description. |
Ah, that's a good point. 👍 |
If you'd like to send a PR with an updated description go right ahead, otherwise let me know and I'll give it another shot. |
I'm happy to take a stab at it. Question, though: what about the lowercase z's? Are we considering valid input to be only uppercase letters and whitespace? |
My understanding, given the current canonical data, is that we're accepting all ASCII characters except for the numbers, although the tests only test A through Z both upper and lowercase. Here's another attempt (tell me what you think):
|
That sounds good to me 👍 I'll make a PR soon to update the description when I have a little bit of free time. |
Replaced private attr_reader methods with direct instance variable access. This is not as elegant as the attr_reader version, but does not generate interpreter warnings. The warnings were: ``` xruby/lib/tasks/exercise_tests_runner.rb:23: warning: private attribute? xruby/lib/tasks/exercise_tests_runner.rb:23: warning: private attribute? xruby/lib/tasks/exercise_test_tasks.rb:24: warning: private attribute? xruby/lib/tasks/exercise_test_tasks.rb:24: warning: private attribute? ``` These warnings are present in Ruby versions < 2.3.0
The description of the run-length-encoding exercise says:
However, there is one test case that contains spaces and lowercase letters.
I believe the test case should be changed to something like
OEJJJJJXAAPPPL
, the intent being that all of the test cases deal with strings containing only uppercase letters. I could make a PR to fix this test case, if you'd like?The text was updated successfully, but these errors were encountered: