From f3e5f2cd758f5013685d997ffd9efdcceccd449f Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 28 Oct 2012 00:03:20 +0000 Subject: * bignum.c (bignew_1): Bignum instances are frozen. Feature #3222 * include/ruby/ruby.h: Fixnum instances are also frozen. * class.c (singleton_class_of): check Bignum before singleton cheking. * test/ruby/test_bignum.rb: add a test. * test/ruby/test_fixnum.rb: ditto. * test/ruby/marshaltestlib.rb, test/ruby/test_eval.rb, test/ruby/test_object.rb: catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37348 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 34f2c69152..3e513cc63d 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1133,7 +1133,7 @@ struct RBignum { (FL_TAINT | FL_UNTRUSTED); \ } while (0) -#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):FLONUM_P(x))) +#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x)))) #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) #if SIZEOF_INT < SIZEOF_LONG -- cgit v1.2.3