mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
readline.c: $SAFE
* ext/readline/readline.c (readline_s_delete_text): $SAFE=4 is obsolete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
56af74277c
commit
38eb518feb
1 changed files with 5 additions and 1 deletions
|
@ -44,6 +44,10 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifndef RUBY_SAFE_LEVEL_MAX
|
||||
#define RUBY_SAFE_LEVEL_MAX 4 /* 2.0 or earlier */
|
||||
#endif
|
||||
|
||||
static VALUE mReadline;
|
||||
|
||||
#define EDIT_LINE_LIBRARY_VERSION "EditLine wrapper"
|
||||
|
@ -574,7 +578,7 @@ readline_s_insert_text(VALUE self, VALUE str)
|
|||
static VALUE
|
||||
readline_s_delete_text(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
rb_secure(4);
|
||||
rb_secure(RUBY_SAFE_LEVEL_MAX);
|
||||
rb_check_arity(argc, 0, 2);
|
||||
if (rl_line_buffer) {
|
||||
char *p, *ptr = rl_line_buffer;
|
||||
|
|
Loading…
Reference in a new issue