ruby-changes:30062
From: nobu <ko1@a...>
Date: Mon, 22 Jul 2013 23:24:51 +0900 (JST)
Subject: [ruby-changes:30062] nobu:r42114 (trunk): readline.c: $SAFE 4
nobu 2013-07-22 23:24:41 +0900 (Mon, 22 Jul 2013) New Revision: 42114 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42114 Log: readline.c: $SAFE 4 * ext/readline/readline.c (readline_s_delete_text): call rb_secure only if level 4 is allowed. otherwise do nothing. Modified files: trunk/ext/readline/readline.c Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 42113) +++ ext/readline/readline.c (revision 42114) @@ -578,7 +578,9 @@ readline_s_insert_text(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L578 static VALUE readline_s_delete_text(int argc, VALUE *argv, VALUE self) { - rb_secure(RUBY_SAFE_LEVEL_MAX); +#if RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); +#endif rb_check_arity(argc, 0, 2); if (rl_line_buffer) { char *p, *ptr = rl_line_buffer; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/