Wednesday, June 2, 2021

Error in Ruby code embedded in vim9script

Hi all,

I got an error using Ruby code embedded in vim9script, seems something has changed in vim9script in this case. Like it understand $ as begin  of a range no ?

Thank you

Error detected while compiling command line..function readxml#mainruby[1]..<SNR>131_rubyCaller:
line    8:
E1050: Colon required before a range: $LOAD_PATH << Vim::evaluate('expand("$vim/extensions/ruby/lib/ruby/3.0.0")')


This is the code

vim9script
# MIT License. Copyright (c) 2021 June 02 Niva.

# Ruby code section
def readxml#mainruby()
  call s:rubyCaller() 
enddef
def s:rubyCaller()


ruby << EOF

# Core
$LOAD_PATH << Vim::evaluate('expand("$vim/extensions/ruby/lib/ruby/3.0.0")')

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/6e3b8882-6076-494d-bfaf-fc2edfb2796en%40googlegroups.com.

No comments:

Post a Comment