php & ruby: ruby equivalent of php var_dump function

Trabla: php & ruby: ruby equivalent  ( analog ) of php var_dump function

Solving:

use <variable>.inspect method

1. PHP code:

<?php

$name = "trololo";

var_dump( $name );

?>

2. RUBY code:

name = 'trololo'

puts name.inspect



No comments:

Post a Comment