https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112017-12-15T22:28:41ZRuby Issue Tracking SystemRuby master - Misc #14190: What are the semantics of $SAFE?https://redmine.ruby-lang.org/issues/14190?journal_id=684522017-12-15T22:28:41Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>I'm not familiar with $SAFE, but the scope seems finer:</p>
<pre><code>$ ruby -e 'f = proc { $SAFE = 1; p [:in_proc, $SAFE] }; f.call; p [:out_of_proc, $SAFE]'
[:in_proc, 1]
[:out_of_proc, 0]
</code></pre>