bug in shell.rb

I

Ian Macdonald

--2B/JsCI69OhZNC5r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

The Shell.rmdir method in shell.rb doesn't work, because it passes the
wrong parameter to the expand_path method:

Exception `TypeError' at /usr/lib/ruby/1.8/shell.rb:120 - cannot convert Array into String
Exception `TypeError' at /usr/lib/ruby/1.8/shell/command-processor.rb:515 - cannot convert Array into String
/usr/lib/ruby/1.8/shell.rb:120:in `expand_path': cannot convert Array into String (TypeError)
from /usr/lib/ruby/1.8/shell.rb:120:in `expand_path'
from /usr/lib/ruby/1.8/shell/command-processor.rb:71:in `expand_path'
from /usr/lib/ruby/1.8/shell/command-processor.rb:208:in `rmdir'
from /usr/lib/ruby/1.8/shell/command-processor.rb:207:in `each'
from /usr/lib/ruby/1.8/shell/command-processor.rb:207:in `rmdir'
from /usr/lib/ruby/1.8/shell/command-processor.rb:511:in `__send__'
from /usr/lib/ruby/1.8/shell/command-processor.rb:511:in `rmdir'
from ./rush:55:in `send'
from ./rush:55
from ./rush:33:in `loop'
from ./rush:63

The one-line fix is attached to this message.

Ian
--
Ian Macdonald | "God is a comedian playing to an audience
System Administrator | too afraid to laugh." - Voltaire
(e-mail address removed) |
http://www.caliban.org |
|

--2B/JsCI69OhZNC5r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=foo

--- /usr/lib/ruby/1.8/shell/command-processor.rb.orig 2003-08-05 01:32:39.000000000 -0700
+++ /usr/lib/ruby/1.8/shell/command-processor.rb 2003-08-05 01:31:59.000000000 -0700
@@ -205,7 +205,7 @@
#
def rmdir(*path)
for dir in path
- Dir.rmdir(expand_path(path))
+ Dir.rmdir(expand_path(dir))
end
end


--2B/JsCI69OhZNC5r--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

rubygems freezes with expand_path error 3
bug on resolv.rb? or I'm just a newbe? 1
Bug in wsdl4r 3
Ruby error 2
ri on snow leopard? 3
Help with require in 1.9.2 p0 1
bug on Ruby extension 2
Oracle-oci8.2.0 4

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top