mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_insnhelper.c: rename macro name ENABLE_IC_FOR_IVAR
to USE_IC_FOR_IVAR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e5e04d45de
commit
3463db3068
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Sep 7 05:06:16 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_insnhelper.c: rename macro name ENABLE_IC_FOR_IVAR
|
||||
to USE_IC_FOR_IVAR.
|
||||
|
||||
Mon Sep 7 03:21:40 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/common.rb (URI.escape): obsoleted.
|
||||
|
|
|
@ -1183,14 +1183,14 @@ vm_get_cvar_base(NODE *cref)
|
|||
}
|
||||
|
||||
|
||||
#ifndef ENABLE_IC_FOR_IVAR
|
||||
#define ENABLE_IC_FOR_IVAR 1
|
||||
#ifndef USE_IC_FOR_IVAR
|
||||
#define USE_IC_FOR_IVAR 1
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
vm_getivar(VALUE obj, ID id, IC ic)
|
||||
{
|
||||
#if ENABLE_IC_FOR_IVAR
|
||||
#if USE_IC_FOR_IVAR
|
||||
if (TYPE(obj) == T_OBJECT) {
|
||||
VALUE val = Qundef;
|
||||
VALUE klass = RBASIC(obj)->klass;
|
||||
|
@ -1237,7 +1237,7 @@ vm_getivar(VALUE obj, ID id, IC ic)
|
|||
static void
|
||||
vm_setivar(VALUE obj, ID id, VALUE val, IC ic)
|
||||
{
|
||||
#if ENABLE_IC_FOR_IVAR
|
||||
#if USE_IC_FOR_IVAR
|
||||
if (!OBJ_UNTRUSTED(obj) && rb_safe_level() >= 4) {
|
||||
rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue