mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Page:
Assumptions
Pages
Assumptions JA
Assumptions
C99 Usage Guidelines
CI Servers
CI用Savings Planの購入
Committer How To JA
Committer How To
Developer How To JA
Developer How To
Developers Meeting
Donation
General Maintenance Policy
Git Migration FAQ JA
Home
How To Backport
How To Contribute
How To Maintain RubyCI Servers
How To Manage Redmine
How To Release JA
How To Report JA
How To Report
How To Request Backport
How To Request Features
Machine Instructions Trace with GDB
Node Position Memo JA
Refinements Spec
Release Engineering 2.1
Release Engineering 2.2
Release Engineering 2.3
Release Engineering 2.4
Release Engineering 2.5
Release Engineering 2.6
Release Engineering 2.7
Release Engineering 3.0
Release Engineering 3.1
Release Engineering 3.2
Release Engineering
Ruby 1.8 Branch Policy JA
Ruby 1.8 Branch Policy
Ruby 1.8 Release Plan JA
Ruby 1.8 Release Plan
Security
Server Resources
Versioning Policy
No results
Table of Contents
This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Ruby's source code is written assuming the following. It is considered to be extremely difficult to port to an environment not satisfying (any of) them.
The Language
- Your C compiler complies ISO/IEC 9899:1999 at least for features in "Known supported features" of https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99.
- The "execution character set" of your C environment (cf: the standard) must be ASCII, not something like EBCDIC.
- Your compiler should not limit user (re-)definitions of identifiers listed in the C standard library.
- (If you choose to opt-in instruction unification feature of the VM) Your C compiler must accept
switch
statement with more than 256 branches. - Your C compiler must accept string literals of at least 7,000 characters.
Types
char
must either be identical tosigned char
or identical tounsigned char
and nothing else.char
must be 8 bits long. There are a lot of places where 8 appear as magic numbers.int
must be 32 bits long.long
must either be 32 bits long or 64 bits long.Fixnum
's width is that oflong
, not that of pointers. This is true even whenlong
is smaller thanVALUE
.time_t
must be an integer type (but signedness might vary).- Unsigned 32 bits integer is required for character handlings due to due to GB18030. Signed 32 bits is insufficient.
- There must either be
intptr_t
, or an integer type that can be casted from/tovoid *
without loss. - Although the standard says
enum
is a signed int, there are parts in the source code whereenum
andlong
are assumed convertible without loss. sizeof(size_t) == sizeof(void*)
holds.sizeof(VALUE) == sizeof(void*)
holds.
Pointers / Memories
- Either
long
orlong long
(_int64
) must be convertible with pointers. void *
must exist.- Function pointers and
void *
must be convertible without loss. - Arbitrary function pointers must be convertible via cast to each other and can be called via casting.
- Machine stack must exist; that is, automatic variables should be arranged in a high-order or low-order specific position of some memory address, not distributed.
- Least significant 2 bits of pointer type values must always be 0.
Floating point number
- Infinity and NaN must exist somewhere in the
double
type.
Policies
Development
For developers
- Developer How To, Developer How To JA
- How To Contribute
- How To Report, How To Report JA
- How To Request Backport
- How To Request Features
- Developers Meeting
For committers
- Committer How To, Committer How To JA
- Git Migration FAQ JA
- How To Backport
- How To Manage Redmine
- How To Release JA
- How To Maintain RubyCI Servers