How to get hint irb (main): 001: 0> "instead of" >> "
Ruby was pre-installed on my Mac, so I wanted to look at it. The first thing I noticed is that irb prompts → instead of irb (main): 001: 0>. I can’t find anything about how to change this using Google, because everyone uses irb (main): 001: 0> in their code; -)
You can help me?
PS: This is not what I think Ruby is broken, but I want to look more stubborn during programming; -)
/home/leapfrog/.rvm/scripts
cd ~/.rvm/scripts
Open the file "irbrc.rb", use superuser privileges to overwrite
$ sudo gedit irbrc.rb
Change the contents of the @prompt hash to the following
@prompt = {
:PROMPT_I => "#{rvm_ruby_string} :%03n > ", # default prompt
:PROMPT_S => "#{rvm_ruby_string} :%03n%l> ", # known continuation
:PROMPT_C => "#{rvm_ruby_string} :%03n > ",
:PROMPT_N => "#{rvm_ruby_string} :%03n?> ", # unknown continuation
:RETURN => " => %s \n",
:AUTO_INDENT => true
}
Hope this helps you :)