forked from aniani/vim
patch 8.1.1056: no eval function for Ruby
Problem: No eval function for Ruby. Solution: Add rubyeval(). (Ozaki Kiichi, closes #4152)
This commit is contained in:
@@ -338,6 +338,9 @@ static void f_reverse(typval_T *argvars, typval_T *rettv);
|
||||
#ifdef FEAT_FLOAT
|
||||
static void f_round(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
#ifdef FEAT_RUBY
|
||||
static void f_rubyeval(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
static void f_screenattr(typval_T *argvars, typval_T *rettv);
|
||||
static void f_screenchar(typval_T *argvars, typval_T *rettv);
|
||||
static void f_screencol(typval_T *argvars, typval_T *rettv);
|
||||
@@ -828,6 +831,9 @@ static struct fst
|
||||
{"reverse", 1, 1, f_reverse},
|
||||
#ifdef FEAT_FLOAT
|
||||
{"round", 1, 1, f_round},
|
||||
#endif
|
||||
#ifdef FEAT_RUBY
|
||||
{"rubyeval", 1, 1, f_rubyeval},
|
||||
#endif
|
||||
{"screenattr", 2, 2, f_screenattr},
|
||||
{"screenchar", 2, 2, f_screenchar},
|
||||
@@ -10351,6 +10357,21 @@ f_round(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_RUBY
|
||||
/*
|
||||
* "rubyeval()" function
|
||||
*/
|
||||
static void
|
||||
f_rubyeval(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
char_u *str;
|
||||
char_u buf[NUMBUFLEN];
|
||||
|
||||
str = tv_get_string_buf(&argvars[0], buf);
|
||||
do_rubyeval(str, rettv);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "screenattr()" function
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user