Also, for things like this, Ruby’s irb
(interactive shell, aka ‘REPL’) is great. You can start it by typing irb
at the command line, then just run any Ruby command:
➜ ~ irb
2.5.3 :001 > [].map { |x| x.to_s }
=> []
Also, for things like this, Ruby’s irb
(interactive shell, aka ‘REPL’) is great. You can start it by typing irb
at the command line, then just run any Ruby command:
➜ ~ irb
2.5.3 :001 > [].map { |x| x.to_s }
=> []