Applied the changes by hramrach (https://github.com/vaiorabbit/ruby-opengl/pull/4).