diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-22 08:28:11 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-22 08:28:11 +0000 |
| commit | 8563dded9c4ec684d6f0974694b943d125b6ec20 (patch) | |
| tree | 2184e205b25e90012772f2ca77d419ed56a61bff /variable.c | |
| parent | 5799c2bfbf7dbf34bc21b45152be717069d3a592 (diff) | |
| download | ruby-8563dded9c4ec684d6f0974694b943d125b6ec20.tar.gz ruby-8563dded9c4ec684d6f0974694b943d125b6ec20.tar.xz ruby-8563dded9c4ec684d6f0974694b943d125b6ec20.zip | |
* variable.c (rb_alias_variable): should not allow variable
aliasing if $SAFE >= 4.
* parse.y (expr): "break" and "next" to take optional expression,
which is used as a value for termination. [new, experimental]
* eval.c (rb_eval): "break" can give value to terminating method.
* eval.c (rb_eval): "break" and "next" to take optional expression.
* eval.c (rb_yield_0): "next" can give value to terminating "yield".
* eval.c (rb_iterate): "break" can give value to terminating method.
* eval.c (proc_call): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
| -rw-r--r-- | variable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/variable.c b/variable.c index 16828a029..4286f5608 100644 --- a/variable.c +++ b/variable.c @@ -700,6 +700,8 @@ rb_alias_variable(name1, name2) { struct global_entry *entry1, *entry2; + if (rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't alias global variable"); entry1 = rb_global_entry(name1); entry2 = rb_global_entry(name2); |
