Ad
  • Default User Avatar

    YEAH! Great!

    Thanks for your patience and your time!
    And because of your bug report, I learnt something about ruby. ;-)

  • Default User Avatar

    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. :-))

  • Default User Avatar

    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"

  • Default User Avatar

    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.

  • Default User Avatar

    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!

  • Default User Avatar

    @jpalmieri: What do you mean with "moved forward"? Was your example wrong? Otherwise the ruby-test is really wrong.

  • Default User Avatar

    "-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.

  • Custom User Avatar

    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!