Ad
  • Custom User Avatar

    Seems like this solution is now obsolete, no?

  • Default User Avatar

    YEAH! Great!

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

  • Custom User Avatar

    Thanks for the fix, SteffenVogel_79! My solution passed the tests.

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

  • Custom User Avatar

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

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

  • Custom User Avatar

    Thank you for confirming that the ruby-test has an issue, SteffenVogel_79

  • Custom User Avatar

    Sorry to confuse. I deleted my response in that comment because I worked out GiacomoSorbi's example but shifted forward 8 iterations instead of backwards 8 iterations (-8).

    My Ruby code above is copied and pasted exactly from the training area which produced the test result I noted above.

  • 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

    Edit: oops, moved forward in my original response. I see your point. Thanks.

  • 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!

  • Custom User Avatar

    Example of a failing random test that seems to be incorrect (unless I'm misunderstanding something, which is quite possible):

    Testing for : uLVBE:cb0CGg,C xIkWYRP and -8
    Expected:  ": ELVBI:cb0CGg,C xukWYRP", instead got: ": ILVBu:cb0CGg,C xEkWYRP"
    
  • Loading more items...