Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
YEAH! Great!
Thanks for your patience and your time!
And because of your bug report, I learnt something about ruby. ;-)
Now, I got the problem and fixed it.
Your solution is changing the parameter-variable "text". So the call of the intern solution starts with a wrong value.
I fixed it, that both calls (user-logic and own-logic) get a dup of the text.
Now it should work. Please try it! (My very first steps in Ruby. :-))
I just see what is confusing:
"assert_equal(exp, act, msg = nil) public"
In all the ruby-tests it is switched.
That means for your example: Your solution leads to ": ELVBI:cb0CGg,C xukWYRP". The expected and right result is: ": ILVBu:cb0CGg,C xEkWYRP"
No, my last post was:
"I just checked the ruby-solution:
": uLVBE:cb0CGg,C xIkWYRP" and -8 leads to the correct result ": ILVBu:cb0CGg,C xEkWYRP".
No problem in the ruby-solution!"
The ruby-solution and the test produce exactly the right result. There is no problem.
I just checked the ruby-solution:
"uLVBE:cb0CGg,C xIkWYRP" and -8 leads to the correct result "ILVBu:cb0CGg,C xEkWYRP".
No problem in the ruby-solution!
@jpalmieri: What do you mean with "moved forward"? Was your example wrong? Otherwise the ruby-test is really wrong.
"-8" means that every vowel would be moved 8 vowel positions back.
Testing for : uLVBE:cb0CGg,C xIkWYRP and -8
-> 3 vowels in the text. So -8 % 3 = -2
So every vowel must be moved 2 vowel positions back.
It must be "ILVBu:cb0CGg,C xEkWYRP".
The "I" went from vowel-position 3 to 1.
So the ruby-test seems really have a problem.
Mh, if I write the 3 vowels like "uEIuEIuEIuEIuEIuEIuEI", then pick a central "u" and move back of 8 positions, I should be on "E", right?
Edit: anyway, please reply under my comment below, otherwise I will never get notified!