Frank Hofmann wrote:

/ ...

> Does anyone have an idea what I could do to get column & line numbers of
> the console window?

Ruby doesn't know about the "console window" that spawned it. The console
window is the parent process of the Ruby process, and the child process
doesn't inherit all of the parent's environment variables. One reason for
this is that you can change the console window size as Ruby runs, but Ruby
can't get the window size changes from its parent.

So, because they cannot be relied on to be correct in the child process,
these two values are simply dropped from the ENV list.

Try this experiment in a Linux desktop environment with an open Konsole or
other command window:

$ while true; do echo "$LINES,$COLUMNS"; usleep 100; done

Now change the window size as the above code line runs. See the numbers
change? Ruby cannot keep track of these changes in its parent.

-- 
Paul Lutus
http://www.arachnoid.com