From: Michael Brooks Date: 2009-03-10T14:18:11+09:00 Subject: Re: Ruby OpenGL Gears example that uses shiny and velvet GLSL shaders Hello Matthias > One question though: > >> def get_shader_source(file_name)揃 >> # Read all the text from the file and return it in the file_content variable. >> file_content = '' >> File.open(file_name) do |file| >> while file_line = file.gets() >> file_content += file_line >> end >> end >> return(file_content) >> end > > You know there is File.read, right? > > -Matthias Actually I didn't give it much thought... that was the least of my worries in making the demo program :) However, I appreciate you taking the time to mention it. I'll investigate and update the code to use File#read instead. Michael