Bug #12368 ยป chr.diff
encoding.c (working copy) | ||
---|---|---|
#include "internal.h"
|
||
#include "encindex.h"
|
||
#include "regenc.h"
|
||
#include "vm_core.h"
|
||
#include <ctype.h>
|
||
#include "ruby/util.h"
|
||
... | ... | |
return ENCINDEX_US_ASCII;
|
||
}
|
||
int
|
||
rb_source_encindex(void)
|
||
{
|
||
int idx = GET_VM()->src_encoding_index;
|
||
return idx < 0 ? ENCINDEX_UTF_8 : idx;
|
||
}
|
||
rb_encoding *
|
||
rb_source_encoding(void)
|
||
{
|
||
return rb_enc_from_index(rb_source_encindex());
|
||
}
|
||
int rb_locale_charmap_index(void);
|
||
int
|
internal.h (working copy) | ||
---|---|---|
int rb_enc_set_dummy(int index);
|
||
void rb_encdb_set_unicode(int index);
|
||
PUREFUNC(int rb_data_is_encoding(VALUE obj));
|
||
int rb_source_encindex(void);
|
||
rb_encoding *rb_source_encoding(void);
|
||
/* enum.c */
|
||
VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
|
numeric.c (working copy) | ||
---|---|---|
if (0xff < i) {
|
||
enc = rb_default_internal_encoding();
|
||
if (!enc) {
|
||
rb_raise(rb_eRangeError, "%d out of char range", i);
|
||
enc = rb_source_encoding();
|
||
}
|
||
goto decode;
|
||
}
|