mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.0.1448: segfault with exception inside :rubyfile command
Problem: Segmentation fault when Ruby throws an exception inside :rubyfile command. Solution: Use rb_protect() instead of rb_load_protect(). (ujihisa, closes #2147, greywolf, closes #2512, #2511)
This commit is contained in:
@@ -49,3 +49,11 @@ func Test_rubydo()
|
||||
bwipe!
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_rubyfile()
|
||||
" Check :rubyfile does not SEGV with Ruby level exception but just fails
|
||||
let tempfile = tempname() . '.rb'
|
||||
call writefile(['raise "vim!"'], tempfile)
|
||||
call assert_fails('rubyfile ' . tempfile)
|
||||
call delete(tempfile)
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user