TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
10.12k stars 13.56k forks source link

Ruby: Project: Caesar Cipher: Fix Ruby Caesar Cipher code example #29107

Open JeffreyMPrice opened 22 hours ago

JeffreyMPrice commented 22 hours ago

Because

There is an internal inconsistency on whether a caesar cipher should use a left shift or right shift. In the entry from Wikipedia the text and example used a left shift, while in the ruby code a right shift is used.

  > caesar_cipher("What a string!", 5)
  => "Bmfy f xywnsl!"

This PR

Update the project instructions to explicitly call for a right shift and note that the Wikipedia quote uses a left shift.

Issue

Closes #29106

Additional Information

Pull Request Requirements

JeffreyMPrice commented 14 hours ago

Thanks @JoshDevHub ! I'll wait for the assignment next time.

I've reverted the change in output and updated the instructions to explicitly call for a right shift. I added to the quick tips that Wikipedia shows a left shift. Also threw in fixing a lower case Caesar.

You are right about all the submitted solutions! I didn't think about that.