aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-26 08:01:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-26 08:01:56 +0000
commit058044c211b48027fe84191571527a464b57036a (patch)
tree931747ae336daceb3067c8b34f7d9f66643c2853 /proc.c
parentf0071d3b311ab5af39a83481ce2363cbe4aab1b2 (diff)
downloadruby-058044c211b48027fe84191571527a464b57036a.tar.gz
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
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files 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);
}
}