[BUG] $SAFE should be Proc local
Reported by kwatch | February 11th, 2008 @ 02:21 AM | in 1.1
$SAFE is Proc local in Ruby but not in Rubinius.
hoge.rb:
puts "*** before: $SAFE=#{$SAFE.inspect}"
proc {
$SAFE = 2
puts "*** in proc: $SAFE=#{$SAFE}"
}.call
puts "*** after: $SAFE=#{$SAFE.inspect}"
result:
$ ruby hoge.rb
*** before: $SAFE=0
*** in proc: $SAFE=2
*** after: $SAFE=0 # not changed
$ shotgun/rubinius hoge.rb
*** before: $SAFE=0
*** in proc: $SAFE=2
*** after: $SAFE=2 # CHANGED!
environment:
$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin8.11.1]
$ shotgun/rubinius -v
rubinius 0.8.0 (ruby 1.8.6 compatible) (2ffa558ee) (02/08/2008) [i686-apple-darwin8.11.1]
Comments and changes to this ticket
-
Ryan Davis February 29th, 2008 @ 03:33 PM
- → Assigned user changed from to Evan Phoenix
- → State changed from new to open
-
Evan Phoenix June 26th, 2008 @ 10:53 AM
- → Tag changed from to bug
- → Milestone changed from 1.0 preview to 1.1
We don't implement $SAFE, and I highly doubt we will for version 1.0
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
