djberg96/win32-file — Issue #1: Exception `NoMethodError' at win32-file-0.6.6/lib/win32/file.rb:486 - undefined method `chr' for nil:NilClass
Author: paz
Created: 2011-11-20 14:04:30+00:00
State: open

Exception `NoMethodError' at win32-file-0.6.6/lib/win32/file.rb:486 - undefined method `chr' for nil:NilClass

This is also a problem in 0.6.7.

I'm not sure what caused it but,

This line (line 486) in lib/win32/file.rb is the problem: file.chop! while file[-1].chr == "\\" # Trim trailing slashes

I fixed the problem by changing it to: file.sub!(/\\+\z/, '')