[SVN] r2829 (Ruby)

Allan Odgaard throw-away-1 at macromates.com
Tue Mar 7 16:39:13 UTC 2006


On 7/3/2006, at 17:09, Gavin Kistner wrote:

> I'm working on this myself for a Ruby runner for Lua commands. I've  
> pasted what I have so far at the end.

Thanks. The main problem with RubyMate though is that it runs the  
script as part of the same context as is handling the other stuff --  
that’s because we catch the exceptions thrown from run-time errors,  
rather than parse the text from just running just.

The problem is then to change stdout and stderr only while running  
the users script, which becomes problematic when the users script  
starts new processes (which inherit the stdout/err file descriptors,  
try e.g. system("echo '<em>hello'") in a script) -- in addition,  
there are problems e.g. with scripts that use at_exit hooks, or  
something about the erb name bindings done (Sune can explain that ;) ).

As a conclusion I think if this needs to hnadle these cases, we can’t  
run the script as part of the tmruby.rb context.

> I am seeing all sorts of stalling problems with the new tmruby.rb  
> [...]

Yeah, it seems quite broken -- I have reverted it.

> One thing that neither mine nor yours does it allow the  
> interleaving of stdout and stderr, with identification of which is  
> which [...]

I do capture stderr separately and color that red.

Though your case seems different, in that the scripts stderr is used  
for Lua run-time errors as well, and you parse that.





More information about the textmate-dev mailing list