In the process of making a Caesar cipher with ruby, I would like to shift the hiragana "Rion" one character at a time. (After creating a method to shift all hiragana one character at a time.) And "n" is converted to "a".
Please write the details of the question here.
(Example) I am making a ●● system with PHP (CakePHP).
The following error message occurred while implementing the ■■ function.
chars = [* "a" .. "" "
text = "Rion"
crypted = text.tr (chars.join, chars.rotate (1) .join)
p cryptedError message
Does not shift one character at a time.
undefined method `rotate 'for # (NoMethodError) ### Corresponding source code
Enter the language name here
Please describe what you tried for the problem here.
I used ord rotate but it didn't respond well.
Please provide more detailed information here.
Answer # 1
The Ruby version seems to be old.The
-Ksoption is also old, maybe 1.8?
- ruby - i want to use the search method for active hash data
- ruby on rails 5 - nomethoderror in text_field method
- about the ruby match method
- about ruby silver inject method
- ruby on rails - i want to use devise's sign_in method in system test
- ruby on rails - undefined method `name' for nil:nilclass
- ruby - rails login mechanism implementation method relationship between corporate id and employee id model
- ruby on rails - how to resolve undefined method `errors' for nil:nilclass
- in ruby, "receive keyword argument in method and use it"
- i want to write a method for reading from standard input in ruby
- ruby on rails - undefined method `content' error cannot be resolved
- ruby on rails - i get no method error in rspec
- i don't know which method is used with the same method name in ruby
- i want to create a method in ruby that sums the remainder of array elements
- ruby on rails - nomethoderror: undefined method `each' for 5:integer
- ruby on rails 6 - i want to resolve undefined method `' for nil:nilclass
- ruby - nomethoderror in posts#edit undefined method `content' for nil:nilclass in rails
- ruby - cannot find id with find method
- ruby - error resolution for undefined method `coments' for nil:nilclass
- about [ruby]include? method
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- i want to call a child component method from a parent in vuejs