FS#29492 - [gvim] ruby 'system' function broken
Attached to Project:
Arch Linux
Opened by John S. Smith (potatoe) - Monday, 16 April 2012, 18:14 GMT
Last edited by Thomas Dziedzic (tomd123) - Sunday, 13 May 2012, 21:08 GMT
Opened by John S. Smith (potatoe) - Monday, 16 April 2012, 18:14 GMT
Last edited by Thomas Dziedzic (tomd123) - Sunday, 13 May 2012, 21:08 GMT
|
Details
Description:
In gvim, trying to use the built-in ruby's "system" call always results in a NoMethodError error being thrown. For example, :ruby system('echo') OR :ruby `echo` causes a "NoMethodError: undefined method `flush` for #<Object:0x00000002857918>" error. Vimux is an example of a vim plugin which the broken ruby system function prevents from working (https://github.com/benmills/vimux/issues/14). I don't know if this is a bug in the packaging, or an upstream bug with vim and ruby 1.9 on linux (the vimux ticket mentions a hand-compiled vim + ruby 1.9 on ubuntu exhibiting the same problem, and a recompiled vim on arch targeting ruby 1.8 fixing it), however on a windows machine with the stock pre-compiled gvim 7.3.46 (from vim.org) and ruby 1.9.3p125 (from rubyinstaller.org), the system function works without error. This error was previously reported in 2010 as Additional info: My systems are all x86_64, I don't know if the problem exists on i686. Might be worth checking, since the working windows version is a 32-bit binary. * package version(s) gvim 7.3.495-1 ruby 1.9.3_p125-4 * config and/or log files etc. Error exists with default config (no user .vimrc/.vim directory) Steps to reproduce: :ruby system('echo') Error is "NoMethodError: undefined method `flush' for #<Object:0x000000017abbc8>" (Note: Object's id will differ from run to run) |
This task depends upon
Closed by Thomas Dziedzic (tomd123)
Sunday, 13 May 2012, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: bump to vim 7.3.515-1 fixes this bug
Sunday, 13 May 2012, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: bump to vim 7.3.515-1 fixes this bug
(and presumably it works on Windows because rubyinstaller seems to ship their DLL as a 1.9.1 API even with ruby 1.9.3, probably to continue working with precompiled packages like vim)
1.9.1 is used as the api version, which is different from the ruby version.
Even arch's packages have a 1.9.1 folder for ruby.
Anyway, if you want to workaround the issue in your script, you can do:
class Object
def flush
end
end
It's effectively the same.
The next vim rebuild will fix this.