From 058044c211b48027fe84191571527a464b57036a Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 26 Nov 2014 08:01:56 +0000 Subject: proc.c: use RUBY_SAFE_LEVEL_MAX * proc.c (rb_method_call_with_block): use RUBY_SAFE_LEVEL_MAX, which is declared in include/ruby/ruby.h since 2.1. The safe level is now limited upto 3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proc.c b/proc.c index ecb9a9f4e7..06ca490d8d 100644 --- a/proc.c +++ b/proc.c @@ -1828,9 +1828,9 @@ rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE pass_ } PUSH_TAG(); if (OBJ_TAINTED(method)) { - const int safe_level_to_run = 4 /*SAFE_LEVEL_MAX*/; + const int safe_level_to_run = RUBY_SAFE_LEVEL_MAX; safe = rb_safe_level(); - if (rb_safe_level() < safe_level_to_run) { + if (safe < safe_level_to_run) { rb_set_safe_level_force(safe_level_to_run); } } -- cgit v1.2.3