Why is my output of
logger.debug ["This is", "an", "Array"]
This isanArray
and not something like ["This is", "an", "Array"]
Is there a way to do this? (I know I could do to_yaml, but that is too verbose for me)
What are some options for a nice clean output of an array, similar to print_r in php?
Try this:
logger.debug ["This is", "an", "Array"].inspect
This also works for all other kinds of objects: Hashes, Classes and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With