summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 02:40:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 02:40:58 +0000
commit445086e56b4c847610506cf6bb072ef928329355 (patch)
treeff23da41f34c295900a01b6923f8082beb4b51b2 /include/ruby/ruby.h
parent431dc5c8b531f4ab67d70ea899f9837d2b10e840 (diff)
class.c: do not freeze class of hidden object
* class.c (rb_freeze_singleton_class): get rid of freeze class of hidden object to fix segfaults. * include/ruby/ruby.h (rb_obj_freeze_inline): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 3d6e45bc4f..6a3949ab8e 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1122,7 +1122,7 @@ rb_obj_freeze_inline(VALUE x)
{
if (FL_ABLE(x)) {
OBJ_FREEZE_RAW(x);
- if (!(RBASIC(x)->flags & FL_SINGLETON)) {
+ if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & FL_SINGLETON)) {
rb_freeze_singleton_class(x);
}
}