Skip to content

Difference between to_s and inspect in Ruby

7
  • Damyanti
  • Md Hamim Mondal
  • Murtaza Ali
  • joshi daniel
Difference between to_s and inspect in Ruby

While running a script in Ruby, we usually want to log data from objects for debugging purpose. puts, p, logger methods are used to log along with to_s, inspect methods to log object. This tutorial will give brief about each method and when to use which o

Read this post on rubyinrails.com


Popular Articles by this blogger