| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
rename ENC_CODERANGE_SINGLE to ENC_CODERANGE_7BIT.
rename ENC_CODERANGE_MULTI to ENC_CODERANGE_8BIT.
Because single byte 8bit character, such as Shift_JIS 1byte katakana,
is represented by ENC_CODERANGE_MULTI even if it is not multi byte.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
is no longer in FL_USERS flags.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
behavior. [ruby-dev:32192]
* encoding.c (enc_name): Encoding should not rely on ENCODING in
the FL_USERS flags.
* encoding.c (rb_enc_from_encoding): do not call rb_enc_associate
for encoding itself.
* encoding.c (enc_register_at): ditto.
* marshal.c (r_ivar): do not set real instance variable for
encoding data associated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in a byte to gain performance.
* string.c (rb_str_delete_bang): ditto.
* string.c (rb_str_squeeze_bang): ditto.
* string.c (rb_str_count): ditto.
* string.c (tr_trans): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (enc_based_encoding): Encoding#base_encoding returns
based encoding of replica.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
ASCII-compatible encoding, even for non-string objects.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
encodings.
* encoding.c (enc_compatible_p): added Encoding.compatible?.
* include/ruby/encoding.h (rb_enc_compatible): prototype.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
rb_encoding of default and primary respectively. [ruby-core:12795]
* encoding.c (set_primary_encoding): removed primary_encoding setter.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* marshal.c (w_encoding): dump encoding name.
* marshal.c (r_ivar): load encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
to self.
* encoding.c (enc_capable): Encoding objects are encoding capable.
* re.c (rb_reg_s_union): check if encoding matching by exact encoding
objects.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enc_table_alias to a name-to-index hash.
* encoding.c (rb_enc_init): use upper case names for aliases to use as
constant names.
* encoding.c (enc_find): allow symbols.
* encoding.c (Init_Encoding): define encoding constants.
* st.c (strcasehash): fix wrong code range condition.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (rb_parser_encoding): added.
* ruby.c (proc_options): added -E and --encoding options.
* ruby.c (process_options): set primary encoding from command line
option if set, or source encoding.
* include/ruby/encoding.h (rb_enc_from_encoding,
rb_get_primary_encoding, rb_set_primary_encoding): prototypes.
* include/ruby/node.h (rb_parser_encoding): prototype.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
in to_s representation as well as #inspect.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flanagan <david AT davidflanagan.com>. [ruby-core:12664]
* encoding.c (enc_dump, enc_load): marshaling feature. a patch from
David Flanagan. [ruby-core:12665]
* encoding.c (Init_Encoding): undefine allocator of Encoding.
[ruby-core:12665], [ruby-core:12666]
* test/ruby/test_encoding.rb: tests for Encoding from David Flanagan
[ruby-core:12665]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_to_encoding, rb_to_encoding_index): helper functions.
* encoding.c (rb_obj_encoding): return Encoding object now.
* gc.c (garbage_collect): mark Encoding objects.
* string.c (rb_str_force_encoding): accept Encoding object as well as
encoding name.
* include/ruby/encoding.h (rb_to_encoding_index, rb_to_encoding):
prototypes.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* ascii.c (OnigEncodingASCII): change the name US-ASCII to ASCII-8BIT.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_alias): check if original name is registered.
* encoding.c (rb_enc_init): register in same order as kcode options in
re.c. added new aliases.
* string.c (rb_str_force_encoding): check if valid encoding name.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* re.c (Init_Regexp): new method Regexp#encoding.
* string.c (str_encoding): moved to encoding.c
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_find_index): search the encoding which has the
given name and return its index if found, or -1.
* st.c (type_strcasehash): case-insensitive string hash type.
* string.c (rb_str_force_encoding): force encoding of self. this name
comes from [ruby-dev:31894] by Martin Duerst. [ruby-dev:31744]
* include/ruby/encoding.h (rb_enc_find_index, rb_enc_associate_index):
prototyped.
* include/ruby/encoding.h (rb_enc_isctype): direct interface to ctype.
* include/ruby/st.h (st_init_strcasetable): prototyped.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_check): ditto.
* string.c (rb_enc_str_coderange): tuned a bit; no broken check.
* encoding.c (rb_enc_check): new encoding comparison criteria.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flags.
* encoding.c (rb_enc_check): allow ASCII compatible strings.
* parse.y (rb_intern_str): use ASCII encoding for ASCII string.
* string.c (rb_enc_str_coderange): check for code-range.
* string.c (rb_str_modify): clear code-range flags.
* string.c (rb_str_hash, rb_str_eql): ASCII compatible strings are
comparable.
* include/ruby/encoding.h: added code-range flags.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (parser_tokadd_string, parser_parse_string,
parser_here_document, parser_yylex): set encoding to US-ASCII.
* parse.y (rb_enc_symname_p): check if valid with encoding.
* parse.y (rb_intern3): let symbols have encoding.
* string.c (rb_str_hash): add encoding index.
* string.c (rb_str_comparable, rb_str_equal, rb_str_eql): check if
compatible encoding.
* string.c (sym_inspect): made encoding aware.
* insns.def (opt_eq): compare with encoding.
* include/ruby/encoding.h (rb_enc_asciicompat): check if ASCII
compatible.
* include/ruby/encoding.h (rb_enc_get_index): added prototype.
* include/ruby/intern.h (rb_str_comparable, rb_str_equal): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
object is encoding capable. [ruby-dev:31780]
* string.c (rb_str_subpat_set): check for if the argument is a String.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
if ONIGENC_CODE_TO_MBCLEN() returns zero. [ruby-dev:31661]
* encoding.c (rb_enc_mbclen): check invalid sequence.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|