diff options
-rw-r--r-- | include/ruby/ruby.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 445b2cd4d3..0bede6ffdd 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1054,7 +1054,12 @@ struct RArray { long len; union { long capa; - const VALUE shared_root; +#if defined(__clang__) /* <- clang++ is sane */ || \ + !defined(__cplusplus) /* <- C99 is sane */ || \ + (__cplusplus > 199711L) /* <- C++11 is sane */ + const +#endif + VALUE shared_root; } aux; const VALUE *ptr; } heap; |