Ruby as a PHP developer
Fabian Blechschmidt
I wrote my first pull request into a Ruby project! Although I never coded ruby before, it does what it should ?
As a PHP developer, the most important part was to get debugging output. I tried to make a debugger work, but it didn’t. So back to „var_dump debugging“…
var_dump
in Ruby
I had no clue how to get any output in Ruby, and some searching brought up:
puts object.inspect
And to make the program stop after it, add a raise
puts object.inspect
raise "Stop the program here"
All this is no news. The only reason I write this blogpost is to help search engines to map puts .inspect
to var_dump
🙂
Other articles from this category