| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* re.c (match_values_at): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
encoding incompatibility. [ruby-core:18600]
* re.c (rb_reg_prepare_enc): more consistent error message.
[ruby-core:18611]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
is dummy encoding. [ruby-dev:37091]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* regerror.c (onig_error_code_to_format): message updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
rb_enc_ascget(). [ruby-dev:37097]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
the function. [ruby-dev:36818]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
ARG_ENCODING_FIXED for Regexp.new("", nil, "n"). [ruby-dev:36761]
* test/ruby/test_regexp.rb (TestRegexp#test_initialize): test
updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
third option argument is now ignored. [ruby-dev:36753]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* string.c (rb_str_rindex_m): need not to call rb_enc_check on
regexp.
* re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for
broken strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
contain non-ASCII characters. So in that case its encoding
must keep original encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
incompatible characters properly.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
left_adjust_char_head.
(ONIGENC_LEFT_ADJUST_CHAR_HEAD): add end argument.
(onigenc_get_left_adjust_char_head): ditto.
* include/ruby/encoding.h (rb_enc_left_char_head): add end argument.
* regenc.h (onigenc_single_byte_left_adjust_char_head): ditto.
* regenc.c (onigenc_get_right_adjust_char_head): follow the interface
change.
(onigenc_get_right_adjust_char_head_with_prev): ditto.
(onigenc_get_prev_char_head): ditto.
(onigenc_step_back): ditto.
(onigenc_get_left_adjust_char_head): ditto.
(onigenc_single_byte_code_to_mbc): ditto.
* re.c: ditto.
* string.c: ditto.
* io.c: ditto.
* regexec.c: ditto.
* enc/euc_jp.c: ditto.
* enc/cp949.c: ditto.
* enc/shift_jis.c: ditto.
* enc/gbk.c: ditto.
* enc/big5.c: ditto.
* enc/euc_tw.c: ditto.
* enc/euc_kr.c: ditto.
* enc/emacs_mule.c: ditto.
* enc/gb18030.c: ditto.
* enc/utf_8.c: ditto.
* enc/utf_16le.c: ditto.
* enc/utf_16be.c: ditto.
* enc/utf_32le.c: ditto.
* enc/utf_32be.c: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
end argument.
* include/ruby/encoding.h (rb_enc_right_char_head): add end argument.
* regenc.c (onigenc_get_right_adjust_char_head): use end argument.
* re.c (rb_reg_adjust_startpos): follow the interface change.
* string.c (rb_str_index): ditto.
* regexec.c (backward_search_range): ditto.
(onig_search): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.
build 5367).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(rb_obj_untrust): new method Object#untrust.
(rb_obj_trust): new method Object#trust.
* array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c,
string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c,
ruby.c, marshal.c: fixes for Object#untrusted?.
* test/ruby/test_module.rb, test/ruby/test_array.rb,
test/ruby/test_object.rb, test/ruby/test_string.rb,
test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for
Object#untrusted?.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm),
process.c (pst_message), re.c (match_inspect): use rb_str_catf.
* dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use
rb_sprintf.
* error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use
rb_vsprintf.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
SEGV by Regexp.union("", nil).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
raise error by /\p{Hiragana}\u{3042}/ in EUC-JP script.
(rb_reg_preprocess): use has_property argument to make regexp
encoding fixed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
fixed [ruby-core:17279].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
str and len by src.
* gc.c (gc_mark_children): mark src field of regexp.
(obj_free): don't free str field.
* re.c (REG_BUSY): removed.
(rb_reg_initialize): prohibit re-initialize regexp.
(rb_reg_search): use usecnt to prevent freeing regexp currently
using. this prevents SEGV by:
r = /\A((a.)*(a.)*)*b/
r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp")
t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")}
sleep 0.2
r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp")
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
vm.c, gc.c:
allocated memory objects by xmalloc (ruby_xmalloc) should be
freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
suppress warnings.
* util.c (quorem, rv_alloc, nrv_alloc): only used in dtoa().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* test/ruby/test_regexp.rb: add tests for above.
* io.c: fix SEGV by IO.allocate.print, etc.
* test/ruby/test_io.rb: add tests for above.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ONIGENC_MBC_ENC_LEN().
* regparse.c (PFETCH): ditto.
* regparse.c (PFETCH): small optimization.
* regexec.c (slow_search): single byte encoding optimization.
* regenc.h (enclen): avoid calling function when encoding's
min_len == max_len.
* re.c (rb_reg_regsub): rb_enc_ascget() optimization for single
byte encoding.
* re.c (rb_reg_search): avoid allocating new re_registers if we
already have MatchData.
* re.c (match_init_copy): avoid unnecessary onig_region_free()
before onig_region_copy.
* encoding.c (rb_enc_get_index): remove implicit enc_capable check
each time.
* encoding.c (rb_enc_set_index): ditto.
* encoding.c (enc_compatible_p): small refactoring.
* include/ruby/encoding.h (rb_enc_dummy_p): inline
rb_enc_dummy_p() and export related code.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* re.c (rb_reg_search): need to free allocated buffer in re_register.
* regexec.c (onig_region_new): more pedantic malloc check.
* regexec.c (onig_region_resize): ditto.
* regexec.c (STATE_CHECK_BUFF_INIT): ditto.
* regexec.c (onig_region_copy): use onig_region_resize.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
ASCII compatible strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* ext/strscan/strscan.c (strscan_do_scan): should adjust encoding
before regex searching.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
<s.wanabe AT gmail.com> in [ruby-dev:34537]. [ruby-dev:34492]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
warnings.
* pack.c (pack_unpack): ditto.
* process.c (rb_syswait): ditto.
* re.c (rb_reg_prepare_enc, rb_reg_prepare_re,
rb_reg_adjust_startpos): ditto.
* regparse.c (onig_name_to_group_numbers): ditto.
* missing/vsnprintf.c (BSD_vfprintf): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* test/ruby/test_parse.rb (TestParse::test_global_variable):
should preserve $& variable.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[ruby-core:16235]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* re.c (rb_memsearch_qs_utf8): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
wanabe <s.wanabe AT gmail.com> in [ruby-dev:34248].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* re.c (rb_memsearch_qs): quick search.
* re.c (rb_memsearch_qs_utf8): quick search for UTF-8 string.
* re.c (rb_memsearch_qs_utf8_hash): hash functions for above.
* re.c (rb_memsearch): use above functions.
* string.c (rb_str_index): give enc to rb_memsearch.
* include/ruby/intern.h (rb_memsearch): move to encoding.h.
* include/ruby/encoding.h (rb_memsearch): move from intern.h.
* common.mk (PREP): add dependency.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
given.
* bignum.c (rb_big_to_s): ditto.
* enum.c (enum_first): ditto.
* eval_jump.c (rb_f_catch): ditto.
* io.c (rb_obj_display): ditto.
* class.c (rb_obj_singleton_methods): ditto.
* object.c (rb_class_initialize): ditto.
* random.c (rb_f_srand): ditto.
* range.c (range_step): ditto.
* re.c (rb_reg_s_last_match): ditto.
* string.c (rb_str_to_i): ditto.
* string.c (rb_str_each_line): ditto.
* string.c (rb_str_chomp_bang): ditto.
* string.c (rb_str_sum): ditto.
* string.c (str_modifiable): declare inline.
* string.c (str_independent): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[ruby-dev:33966]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (rb_intern3): non ASCII compatible symbols.
* re.c (rb_reg_regsub): add encoding check.
* string.c (rb_str_chomp_bang): ditto.
* test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
"X".sub!(/./, sprintf("\\%c", 255)).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|