From: Tanaka Akira Date: 2013-06-25T20:16:58+09:00 Subject: [ruby-core:55648] Re: [CommonRuby - Feature #8568][Open] Introduce RbConfig value for native word size, to avoid Fixnum#size use 2013/6/25 headius (Charles Nutter) : > Issue #8568 has been reported by headius (Charles Nutter). > I propose two additions to Ruby: > > 1. RbConfig value "word_size" for native word size. This could reflect bit size (32, 64) or byte size (4, 8). > > 2. A constant, somewhere in Ruby, to provide access to this value more directly. I'm not sure where this should go. ObjectSpace::WORD_SIZE? Although "word" is ambiguous, providing sizeof(long), sizeof(char*), etc. via RbConfig with clear names seems good feature: RbConfig["sizeof(long)"], RbConfig["sieof(char*)"], RbConfig["sizeof(time_t)"], ... -- Tanaka Akira