diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-11 05:37:32 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-11 05:37:32 +0000 |
commit | cc3088ea519efa279e4aa71fb994328a9080483f (patch) | |
tree | 45b5736589c617e0fff1848094c3c7d74663d0e7 /include/ruby | |
parent | d2d4017d8099c22dec6913b0f0b938dd8ef21850 (diff) | |
download | ruby-cc3088ea519efa279e4aa71fb994328a9080483f.tar.gz |
* include/ruby/ruby.h: freeze nil/true/false.
* gc.c (should_be_finalizable): check frozen after checkin FL_ABLE.
* object.c (rb_obj_taint): check
OBJ_TAINTABLE(obj).
* object.c (rb_obj_freeze): remove immediate_frozen_tbl
because all of immediate values are frozen. YAY!
* object.c (rb_obj_frozen_p): ditto.
* test/ruby/test_eval.rb: skip instance_variable_set for
frozen objects.
* test/ruby/test_weakmap.rb: check ArgumentError instead of
RuntimeError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/ruby.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 0aebfa4e49..01e9be386b 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1126,7 +1126,7 @@ struct RStruct { (OBJ_TAINTABLE(x) && FL_ABLE(s)) ? \ RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT : 0) -#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x)||STATIC_SYM_P(x)))) +#define OBJ_FROZEN(x) (FL_ABLE(x) ? !!(RBASIC(x)->flags&FL_FREEZE) : 1) #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) #if USE_RGENGC |