ZyX wrote:
> Consider the following code:
>
> " test-filereadable.vim:
> set nocompatible
> let s:g={"load":{"saveoptions":{"abc":function("string")}}}
> function TestFileReadable()
> let file="/non-existent-file"
> let tail="abc"
> if filereadable(file)
> call s:g.load.saveoptions[tail](readfile(file, 'b'))
> endif
> endfunction
> try
> call TestFileReadable()
> catch
> call writefile([v:exception], "bad")
> endtry
> qa!
>
> For fea3207b800d (vim-7.3.96) and earlier revisions this code does not
> throw any errors (because it contains none). For faf4b09c396e
> (vim-7.3.97) and later revisions we get the following contents in the
> «bad» file:
>
> Vim(call):E15: Invalid expression:
> s:g.load.saveoptions[tail](readfile(file,
> 'b'))
>
> (one line, of course). Expression s:g.load.saveoptions[tail](...) is actually
> used for existing files in one of my plugins and thus is valid.
>
> Attaching files that were used to find revision where it was
> introduced with `hg bisect'. If you want to repeat bisecting, you will
> need to adjust paths in `test-bad.zsh'.
Yeah, Yukihiro Nakadaira also noticed a problem with the patch.
No solution yet, I'm afraid.
--
hundred-and-one symptoms of being an internet addict:
143. You dream in pallettes of 216 websafe colors.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php