From 1e27eda2fa313865bda1246175b3d6ebfe8cc533 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 19 Sep 2013 05:30:02 +0000 Subject: * include/ruby/ruby.h: make Symbol objects frozen. [Feature #8906] I want to freeze this good day, too. * test/ruby/test_eval.rb: catch up this change. * test/ruby/test_symbol.rb: add a test to check frozen symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 30033023bb..cb432538b1 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1247,7 +1247,7 @@ struct RBignum { RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT; \ } while (0) -#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x)))) +#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x)||SYMBOL_P(x)))) #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) #if USE_RGENGC -- cgit v1.2.3