Coverage Report

Created: 2026-03-31 07:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/ruby/dmyenc.c
Line
Count
Source
1
// This file is used by dynamically-linked ruby, which has no
2
// statically-linked encodings other than the builtin encodings.
3
//
4
// - miniruby does not use this Init_enc. Instead, "miniinit.c"
5
//   provides Init_enc, which defines only the builtin encodings.
6
//
7
// - Dynamically-linked ruby uses this Init_enc, which requires
8
//   "enc/encdb.so" to load the builtin encodings and set up the
9
//   optional encodings.
10
//
11
// - Statically-linked ruby does not use this Init_enc. Instead,
12
//   "enc/encinit.c" (which is a generated file) defines Init_enc,
13
//   which activates the encodings.
14
15
0
#define require(name) ruby_require_internal(name, (unsigned int)sizeof(name)-1)
16
int ruby_require_internal(const char *, int);
17
18
void
19
Init_enc(void)
20
0
{
21
0
    if (require("enc/encdb.so") == 1) {
22
0
        require("enc/trans/transdb.so");
23
0
    }
24
0
}