run on jruby and rubinius
Signed-off-by: ShiningRay <shiningray.nirvana@gmail.com>