Shawn W_ wrote:
> Drew Olson wrote:
>> Eclipse with RDT can indeed execute code as long as you point it at the 
>> interpreter. However, there is a weird syncing issue with I/O display 
>> that you have to fix. It's one line of code and explained on the RDT 
>> website.
> 
> This is similar to what I had to do to get Scite's program running pane 
> working. One line of code into the Ruby configuration file. I did that 
> for that program and it didn't work for me.

The console used by most of these editors (except VimMate, which embeds 
gnome-terminal) is not a true terminal emulator. So you were having 
problems because your script's output was being buffered, perhaps 
excessively, by the text editor's console.

When I add the following line to the top of your program, it works fine 
in the text editor's console.

  STDOUT.sync = true  # disable output buffering

Also, might I recommend that you consistently indent your code to 
indicate logical structure (i.e. stuff within the if & while statements 
should appear "within" them).

Here is a screen shot of the fixed version of your program in jEdit:

  http://rubyurl.com/aVP

-- 
Posted via http://www.ruby-forum.com/.