Update to work with newer ruby's

Fix for syntax changes in ruby.
Fix #2 for new Ruby's syntax

Fix #2 for new Ruby's syntax
Merge pull request #2 from misiek08/master

changed type to ctype (aka counter type)