Hi,

Last month, in my spare time, I have started to implement Process::Status
and the related methods Kernel#system, Kernel#exec and %x[..]. While trying
to solve a few design issues on my side, I noticed that %x[..] behaves like
Kernel#exec in that they both throw exceptions:

ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

irb(main):001:0> system "doesnotexist"
=> false
irb(main):002:0> exec "doesnotexist"
Errno::ENOENT: No such file or directory - doesnotexist
        from (irb):2:in `exec'
        from (irb):2
irb(main):003:0> %x[doesnotexist]
Errno::ENOENT: No such file or directory - doesnotexist
        from (irb):3:in ``'
        from (irb):3
irb(main):004:0>

Now the problem is that the implementation of %x[..] is in the Ruby project
(more precisely, in the static method ExecuteCommand of RubyOps)
while the NoEntryError exception (Errno::ENOENT) is defined in the
IronRuby.Libraries project and thus not accessible AFAIK.

Any ideas on how to work around this?

-- 
Daniele Alessandri
http://www.clorophilla.net/blog/
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to