Ruby: method to print and neat an array
You can use the method p. Using p is actually equivalent of using puts + inspect on an object. humans = %w( foo bar baz ) p humans # => [“foo”, “bar”, “baz”] puts humans.inspect # => [“foo”, “bar”, “baz”] But keep in mind p is more a debugging tool, it should not be used … Read more