[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84296] [Ruby trunk Misc#14190] What are the semantics of $SAFE?
From:
mame@...
Date:
2017-12-15 22:28:42 UTC
List:
ruby-core #84296
Issue #14190 has been updated by mame (Yusuke Endoh).
I'm not familiar with $SAFE, but the scope seems finer:
```
$ ruby -e 'f = proc { $SAFE = 1; p [:in_proc, $SAFE] }; f.call; p [:out_of_proc, $SAFE]'
[:in_proc, 1]
[:out_of_proc, 0]
```
----------------------------------------
Misc #14190: What are the semantics of $SAFE?
https://bugs.ruby-lang.org/issues/14190#change-68452
* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
$SAFE is documented in many places as thread-local, but it seems more than that.
For example:
# a.rb
$SAFE=1
p $SAFE
require "#{Dir.pwd.untaint}/b.rb"
# b.rb
p [:in_b, $SAFE]
gives:
$ ruby -r./a -e 'p $SAFE'
1
[:in_b, 0]
0
So in b and in -e, $SAFE is 0.
Is it file-based somehow?
I was trying to understand what
https://github.com/ruby/ruby/blob/7c4306e6e9c3c4a255f4ad20134c1832dbe45ba2/test/rubygems/test_gem.rb#L9-L13
is supposed to do.
Does it make sense? What does it do?
It seems the test_* methods in that file actually read $SAFE as 0, not 1.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>