| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* localeinit.c (rb_locale_charmap): [RDOC] move
Encoding.locale_charmap rdoc from encoding.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_unicode_p): fix document. predicate
functions may return non-zero values other than 1 as true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_locale_encindex): find encoding index without
making a string object every time. [ruby-core:58160] [Bug #9080]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (enc_autoload): drop dummy encoding flag from
the loaded encoding index. this flag is used only in this
source.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* use rb_funcallv() for no arguments call instead of variadic
rb_funcall().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (load_encoding): use rb_require_internal instead of
calling rb_require_safe with protection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
use 0 for rb_data_type_t::reserved instead of NULL, since its type
may be changed in the future and possibly not a pointer type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
already declared in include/ruby/encoding.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
includable without prior inclusion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trims our binary size slightly (numbers from x86-64):
text data bss dec hex filename
2795184 22766 72024 2889974 2c18f6 ruby.before
2795112 22766 72024 2889902 2c18ae ruby.after
[ruby-core:65304]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_get_index): deal with symbols instead of IDs
to get rid of inadvertent pin-downs.
* enum.c (chunk_ii): ditto.
* enumerator.c (append_method): ditto.
* iseq.c (iseq_load): ditto.
* marshal.c (w_symbol, r_symlink, r_symreal, r_symbol): ditto.
* signal.c (trap_handler): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (enc_find): [DOC] never accepted a symbol.
[ruby-dev:48308] [Bug #9966]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c: move `ruby_encoding_index` stuff from
include/ruby/encoding.h to hide the extra field.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* include/ruby/encoding.h: constify `rb_encoding` itself, not only
arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* include/ruby/encoding.h: constify `rb_encoding` arguments.
* include/ruby/oniguruma.h: constify `OnigEncoding` arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_default_internal): fix rdoc. `__FILE__` is
in filesystem encoding but not `default_internal`.
[ruby-core:61894] [Bug #9713]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* parse.y (rb_str_dynamic_intern): associate proper encoding with
the result symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_get_index): the encoding of dynamic symbol
comes from fstr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* encoding.c (enc_capable): Symbol is now encoding capable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* string.c (get_actual_encoding): get actual encoding according to
the BOM if exists.
* string.c (rb_str_inspect): use according encoding, instead of
pseudo encodings, UTF-{16,32}. [ruby-core:59757] [Bug #8940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask
encoding index and ignore dummy flags. [ruby-core:59354] [Bug #9314]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/contributors.rdoc: Ditto.
* doc/maintainers.rdoc: Ditto.
* doc/contributors.rdoc: Ditto.
* doc/standard_library.rdoc: Ditto.
* doc/syntax/modules_and_classes.rdoc: Ditto.
* encoding.c: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safe functions during garbage collection such as xfree().
On default, T_DATA objects are freed at same points as fianlizers.
This approach protects issues such as reported by [ruby-dev:35578].
However, freeing T_DATA objects immediately helps heap usage.
Most of T_DATA (in other words, most of dfree functions) are safe.
However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
for safety.
* cont.c: ditto.
* dir.c: ditto.
* encoding.c: ditto.
* enumerator.c: ditto.
* error.c: ditto.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* iseq.c: ditto.
* marshal.c: ditto.
* parse.y: ditto.
* proc.c: ditto.
* process.c: ditto.
* random.c: ditto.
* thread.c: ditto.
* time.c: ditto.
* transcode.c: ditto.
* variable.c: ditto.
* vm.c: ditto.
* vm_backtrace.c: ditto.
* vm_trace.c: ditto.
* ext/bigdecimal/bigdecimal.c: ditto.
* ext/objspace/objspace.c: ditto.
* ext/stringio/stringio.c: ditto.
* ext/strscan/strscan.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (load_encoding): should preserve outer errinfo, so that
expected exception may not be lost. [ruby-core:57949] [Bug #9038]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_locale_encindex): defer initialization of win32 code
page table until encoding db loaded.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* win32/file.c (code_page_i, rb_w32_init_file): make encoding to code
page mapping at initialization directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.
* encoding.c (enc_autoload): keep dummy encodings dummy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (is_obj_encoding): new macro to check if obj is an
Encoding. obj can be any type while is_data_encoding expects T_DATA
only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
is_data_encoding(obj) assumes that `obj' is T_DATA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_code_to_mbclen): add new function which returns
mbclen from codepoint like as rb_enc_codelen() but 0 for invalid
char.
* include/ruby/encoding.h (rb_enc_code_to_mbclen): declaration and
shortcut macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (enc_set_index): since r41967, old terminator is dealt
with in str_fill_term(). should not consider it here because this
function is called before any encoding is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
move from encoding.c.
* miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
define miniruby specific functions only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* encoding.c (rb_enc_init): no longer needs NO_PRESERVED_ENCODING.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* encoding.c (enc_inspect): defer loading autoloaded encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* encoding.c (enc_check_encoding): use is_data_encoding() to check
type consistently.
* encoding.c (must_encoding): return rb_encoding* instead of encoding
index.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (enc_inspect): use PRIsVALUE to preserve the result
encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (enc_set_index): deal with terminator so that
rb_enc_set_index also works.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_associate_index): fill new terminator length, not
old one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_associate_index): refill the terminator if it
becomes longer than before. [ruby-dev:47500] [Bug #8624]
* string.c (str_null_char, str_fill_term): get rid of out of bound
access.
* string.c (rb_str_fill_terminator): add a parameter for the length of
new terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* internal.h: add EUC-JP and Windows-31J.
* re.c (rb_char_to_option_kcode): use built-in encoding indexes in
internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* internal.h: add UTF8-MAC.
* dir.c (rb_utf8mac_encoding): use built-in encoding indexes in
internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* internal.h: add UTF-{16,32} dummy encodings.
* string.c (rb_str_inspect, str_scrub0): use built-in encoding indexes
in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* internal.h: add UTF-{16,32}{BE,LE}.
* io.c (io_strip_bom): use built-in encoding indexes in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in
encoding indexes for optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* encoding.c (enc_inspect, rb_locale_encindex),
(enc_set_filesystem_encoding, rb_filesystem_encindex): use built-in
encoding indexes directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_set_index, rb_enc_associate_index): validate
argument encoding index.
* include/ruby/encoding.h (ENCODING_SET): use rb_enc_set_index()
instead of setting inlined bits directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* encoding.c (rb_enc_init): register preserved indexes.
* internal.h (ruby_preserved_encindex): move from encoding.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of %s and RSTRING_PTR to protect objects from being garbage
collected too soon
* encoding.c (str_to_encindex): ditto
* hash.c (rb_hash_fetch_m): ditto
* io.c (rb_io_reopen): ditto
* parse.y (reg_fragment_check_gen): ditto
* parse.y (reg_compile_gen): ditto
* parse.y (ripper_assert_Qundef): ditto
* re.c (rb_reg_raise): ditto
* ruby.c (set_option_encoding_once): ditto
* vm_eval.c (rb_throw_obj): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when $SAFE is set to 4. $SAFE=4 is now obsolete.
[ruby-core:55222] [Feature #8468]
* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
Kernel#untrusted?, untrust, and trust are now deprecated.
Their behavior is same as tainted?, taint, and untaint,
respectively.
* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
respectively.
* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
ext/socket/socket.c, ext/socket/udpsocket.c,
ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
safe.c, string.c, thread.c, transcode.c, variable.c,
vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
$SAFE=4.
* test/dl/test_dl2.rb, test/erb/test_erb.rb,
test/readline/test_readline.rb,
test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
test/ruby/test_array.rb, test/ruby/test_dir.rb,
test/ruby/test_encoding.rb, test/ruby/test_env.rb,
test/ruby/test_eval.rb, test/ruby/test_exception.rb,
test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
test/ruby/test_io.rb, test/ruby/test_method.rb,
test/ruby/test_module.rb, test/ruby/test_object.rb,
test/ruby/test_pack.rb, test/ruby/test_rand.rb,
test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
test/ruby/test_struct.rb, test/ruby/test_thread.rb,
test/ruby/test_time.rb: remove tests for $SAFE=4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|