PHP to Ruby
Convert PHP code into Ruby!
-
is_int
Posted on August 4th, 2009 No commentsThe is_int() function allows you to check if a particular variable is an integer (type).
PHP
$number = 9.5; var_dump( is_int($number) ); // => false
Ruby
number = 9.5; puts number.is_a?(Integer); # => false
Leave a reply


