ruby: rewrite board-ruby.c