diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 08:01:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 08:01:56 +0000 |
commit | 058044c211b48027fe84191571527a464b57036a (patch) | |
tree | 931747ae336daceb3067c8b34f7d9f66643c2853 /proc.c | |
parent | f0071d3b311ab5af39a83481ce2363cbe4aab1b2 (diff) | |
download | ruby-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } } |