Граф коммитов

153 Коммитов

Автор SHA1 Сообщение Дата
naruse 31796f17d3 Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
[Bug #13892]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 13:50:13 +00:00
nobu ea940cc4dc regparse.c: initialize return values
* regparse.c (parse_char_class): initialize return values before
  depth limit check.  returned values will be freed in callers
  regardless the error.  [ruby-core:79624] [Bug #13234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 09:46:12 +00:00
naruse 6b1c6e0e55 Merge Onigmo 6.1.1
* Support absent operator https://github.com/k-takata/Onigmo/issues/82
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-11 15:08:33 +00:00
naruse 2873edeafb Merge Onigmo 6.0.0
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY
* fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78
* suppress warning: https://github.com/k-takata/Onigmo/pull/79
* include/ruby/oniguruma.h: include onigmo.h.
* template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in
  enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 17:47:04 +00:00
naruse c11e648799 Regexp supports Unicoe 9.0.0's \X
* meta character \X matches Unicode 9.0.0 characters with some workarounds
  for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences.
  [Feature #12831] [ruby-core:77586]

The term "character" can have many meanings bytes, codepoints, combined
characters, and so on. "grapheme cluster" is highest one of such words,
which means user-perceived characters.
Unicode Standard Annex #29 UNICODE TEXT SEGMENTATION specifies how to
handle grapheme clusters (extended grapheme cluster).
But some specs aren't updated to current situation because Unicode Emoji
is rapidly extended without well definition.
It breaks the precondition of UTR#29 "Grapheme cluster boundaries can be
easily tested by looking at immediately adjacent characters". (the
sentence will be removed in the next version)
Though some of its detail are described in Unicode Technical Report #51
UNICODE EMOJI but it is not merged into UTR#29 yet.

http://unicode.org/reports/tr29/
http://unicode.org/reports/tr51/
http://unicode.org/Public/emoji/4.0/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 17:29:19 +00:00
naruse 05c631eefd * regparse.c (fetch_token_in_cc): raise error if given octal escaped
character is too big. [Bug #12420] [Bug #12423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-25 09:45:22 +00:00
naruse b3935f179b * gc.c (rb_gc_unprotect_logging): throw rb_memerror when it cannot
allocate memory. This is pointed out by Facebook's Infer.

* gc.c (gc_prof_setup_new_record): ditto.

* regparse.c (parse_regexp): ditto.

* util.c (MALLOC): use xmalloc and xfree like above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 17:52:38 +00:00
naruse 782fd488d7 * regparse.c (fetch_name_with_level): allow non word characters
at the first character.  [Feature #11949]

* regparse.c (fetch_name): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-21 16:09:09 +00:00
nobu b3377eaa13 Revert r52995
revert slow atomic operations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 07:30:44 +00:00
nobu 0599d7de58 use atomic operations
* regcomp.c (onig_chain_link_add): use atomic operation instead of
  mutex.
* regint.h (ONIG_STATE_{INC,DEC}_THREAD): ditto.
* regparse.c (PopFreeNode, node_recycle): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 06:48:15 +00:00
nobu 5f63d9e741 regparse.c: remove unused variable
* regparse.c (add_ctype_to_cc): suppress a warning by removing
  unused variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-16 02:44:10 +00:00
naruse d2a5354255 * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-15 16:18:41 +00:00
naruse 64c81e40d4 * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
this includes Support for Unicode 7.0 [Bug #9092].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 03:27:25 +00:00
naruse 536a3274c9 * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
[bug] fix problem with optimization of \z (Issue #16) [Bug #8210]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13 11:30:35 +00:00
naruse 78dbaa1648 * Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
v5.13.3 [Bug#7972] [Bug#7974]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01 16:36:37 +00:00
naruse b44ac42335 * regparse.c (add_ctype_to_cc): don't check dup warn on adding
negative ctype to cclass. [Bug #7471] [ruby-core:50344]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-13 21:51:37 +00:00
nobu be7bf5aa0c adjust style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 12:22:04 +00:00
usa be3a6b8c40 * regparse.c (parse_char_class): should match with a hyphen after a
range in a character class.

* test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
  test.

* test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
  error message.

* test/ruby/test_regexp.rb
  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
  because the previous name was wrong.

* test/ruby/test_regexp.rb
  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
  more test pattern.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-13 14:23:40 +00:00
nobu 40ce1eb403 warning: no indirect flag
* regparse.c (is_onechar_cclass): remove "found" indirect flag to
  suppress warnings by gcc 4.7.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 08:41:01 +00:00
naruse bad859ca3e * regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.
* regparse.c (is_onechar_cclass): restructured to clarify that c is
  used iff found == 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 20:46:11 +00:00
shyouhei 2c1322ec88 * regparse.c (PFETCH_READY): this line was to suppress warning,
but  did emit  warnings if  -Wuninitialized was  set.  Assigning
	  NULL instead if pfetch_prev should suffice the situation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 08:58:05 +00:00
naruse b4be4c7be3 * regparse.c (onig_number_of_names): suppress a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-02 18:24:24 +00:00
naruse b2cc0976a7 * regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
[Bug#6143] [Bug#6144] [Bug#6145]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21 10:53:06 +00:00
nobu c037f1f616 * adjust style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15 01:39:00 +00:00
naruse 291fa223cf * regparse.c (is_onechar_cclass): optimize character class
Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee.

* regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a
  char class contains no char

* enc/unicode.c (init_case_fold_table): define the sizes of case
  folding tables in casefold.h

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29 16:29:06 +00:00
naruse a77ea177fe * regparse.c (add_code_range_to_buf0): wrong condition of duplicated
warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-26 14:32:54 +00:00
naruse b790678398 * regparse.c (fetch_token): don't use // comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 02:03:56 +00:00
nobu 541e1aff20 * regparse.c: fix warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 01:51:05 +00:00
naruse 0424e152c6 * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
https://github.com/k-takata/Onigmo
  cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
  cp oniguruma.h
  cp tool/enc-unicode.rb
  cp -r enc/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 07:42:23 +00:00
nobu 3581d76bbb * regparse.c: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 10:12:02 +00:00
nobu c09f46301b * regparse.c (PFETCH_READY): separate gcc specific trick.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 10:08:07 +00:00
nobu b526738c3b * bignum.c (big_rshift), compile.c (validate_label,
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
  (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
  (rb_io_advise), parse.y (parser_compile_string)
  (rb_parser_compile_file), proc.c (binding_free), process.c
  (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
  (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
  signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
  vm_insnhelper.c (vm_expandarray): suppress
  unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 09:57:00 +00:00
naruse 48de1e292a * addr2line.c: suppressed shorten-64-to-32 warnings.
* regcomp.c: ditto.
* regexec.c: ditto.
* regint.h: ditto.
* regparse.c: ditto.
* regparse.h: ditto.
* time.c: ditto.
* variable.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 03:44:57 +00:00
mame 0dbe6b6113 * regparse.c (and_cclass, or_cclass): fix memory leak. Coverity Scan
found this bug.  [ruby-dev:42579]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15 16:06:35 +00:00
nobu 3642fa1992 * regparse.c (onig_syntax_warn): do not use external strings as
printf format.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31 10:26:01 +00:00
naruse 81c5ede3ca * regparse.c (add_code_range_to_buf0): fix false negative
warning when given range is just before previous range.
  [ruby-dev:41406]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-25 15:12:19 +00:00
matz db37773e13 * include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.
* re.c (make_regexp): use onig_new() instead of onig_alloc_init().

* re.c (rb_reg_to_s): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01 21:54:59 +00:00
naruse 62f8c207b2 * regcomp.c (onig_compile): initialize ScanEnv.
mainly to initialize env->warnings_flag [ruby-dev:40196]

* regparse.c (scan_env_clear): clear warnings_flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28 00:50:17 +00:00
naruse 67e11229ec * regparse.c (fetch_token): warn invalid back reference
and subexp call. (\k and \g).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11 20:52:51 +00:00
naruse e0e3d15f12 * regparse.c (fetch_token_in_cc): warn when \p is not
followed by property name.

* regparse.c (fetch_token): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11 01:06:30 +00:00
naruse c506f190e1 * regerror.c (onig_vsnprintf_with_pattern): added.
* regparse.c (onig_syntax_warn): use above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11 00:48:35 +00:00
naruse 8e9fb2e14c * regparse.c (onig_syntax_warn): added.
* regparse.c (CC_ESC_WARN, CLOSE_BRACKET_WITHOUT_ESC_WARN,
  CC_DUP_WARN, UNKNOWN_ESC_WARN): use onig_syntax_warn.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 18:12:26 +00:00
nobu 62f073a386 * regparse.c (st_str_end_key, str_end_cmp, str_end_hash):
constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22 07:26:22 +00:00
naruse 83b76913d8 Warn unknown escaped chars in regexp.
* regparse.c (UNKNOWN_ESC_WARN): added.

* regparse.c (conv_backslash_value): Warn unknown
  escaped chars in regexp. [ruby-dev:39104]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 07:00:44 +00:00
nobu 31b7ae00c0 * include/ruby/st.h (st_hash_func): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:10:04 +00:00
naruse 6ab36c6e19 *regparse.c (CC_DUP_WARN): use rb_compile_warn if ScanEnv has source
information. [ruby-dev:39105]

*re.c (rb_reg_compile): add sourcefile and sourceline to the arguments.

*re.c (make_regexp): ditto.

*re.c (rb_reg_initialize): ditto.

*re.c (rb_reg_initialize_str): ditto.

*re.c (rb_reg_compile): ditto.

*regcomp.c (onig_compile): ditto.

*regint.h (onig_compile): ditto.

*re.c (reg_compile_gen): follow above.

*re.c (rb_reg_to_s): ditto.

*re.c (make_regexp): ditto.

*re.c (rb_reg_initialize): ditto.

*re.c (rb_reg_initialize_str): ditto.

*re.c (rb_reg_new_str): ditto.

*re.c (rb_enc_reg_new): ditto.

*re.c (rb_reg_initialize_m): ditto.

*re.c (rb_reg_init_copy): ditto.

*regcomp.c (onig_new): ditto.

*regcomp.c (onig_compile): set sourcefile and sourceline to scan_env.

*regparse.h (ScanEnv): add sourcefile and sourceline.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-30 08:00:31 +00:00
naruse 9d7ff244c3 Don't warn if the duplicate is caused by /i.
* regparse.c (add_code_range_to_buf0): added with checkdup argument.

* regparse.c (add_code_range_to_buf): use above.

* regparse.c (add_code_range0): added with checkdup argument.

* regparse.c (add_code_range): use above.

* regparse.c (i_apply_case_fold): don't warn if the duplicate is

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17 01:46:34 +00:00
nobu 95c5a63d2d * regparse.c: commit miss again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 02:20:00 +00:00
nobu 2a8ff72f30 * regparse.c: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 02:15:13 +00:00
nobu 2318bef1de * regparse.c (parse_char_class, parse_exp, parse_branch),
(parse_subexp): fixed memory leak.  a patch from Ralf Junker
  <ralfjunker AT gmx.de> at [ruby-core:24921].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 01:45:18 +00:00
naruse c0ec326b7b * regparse.c (add_ctype_to_cc_by_range): fix the first
character bigger than sb_out was dropped.

* test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket):
  add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15 16:27:13 +00:00
naruse 249697855e \d, \s and \w are now non Unicode class. [ruby-dev:39026]
* include/ruby/oniguruma.h
  (ONIGENC_CTYPE_SPECIAL_MASK): added.
  (ONIGENC_CTYPE_D): ditto.
  (ONIGENC_CTYPE_S): ditto.
  (ONIGENC_CTYPE_W): ditto.

* regparse.c: \d, \s and \w are now non Unicode class.
  [ruby-dev:39026]
  (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w.
  (fetch_token): ditto.
  (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW].
  (parse_exp): ditto.

* test/ruby/test_regexp.rb (TestRegexp#test_char_class):
  add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15 16:01:33 +00:00
naruse 60ab77a16a Warn duplicated characters in character class of regexp. [ruby-core:24593]
* include/ruby/oniguruma.h (ONIG_SYN_WARN_CC_DUP): defined.
* regparse.h (ScanEnv): add warnings_flag.
* regparse.c (CC_DUP_WARN): defined for warn duplicated characters in
  character class of regexp. [ruby-core:24593]
  (add_code_range_to_buf): add CC_DUP_WARN.
  (next_state_val): add CC_DUP_WARN.
  (OnigSyntaxRuby): add ONIG_SYN_WARN_CC_DUP.
  (SET_ALL_MULTI_BYTE_RANGE): add env to arguments.
  (add_code_range): ditto.
  (add_code_range_to_buf): ditto.
  (not_code_range_buf): ditto.
  (or_code_range_buf): ditto.
  (and_code_range1): ditto.
  (and_code_range_buf): ditto.
  (and_cclass): ditto.
  (or_cclass): ditto.
  (add_ctype_to_cc_by_range): ditto.
  (add_ctype_to_cc): ditto.
  (parse_char_class): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 04:14:38 +00:00
nobu 23a32d6444 * include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30 02:08:54 +00:00
nobu 12d2c8ba41 stripped trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:23:33 +00:00
matz f7692a3373 * regparse.c (is_invalid_quantifier_target): Perl and old Ruby
accepts quantifier on anchors.  [ruby-core:20161]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29 10:55:51 +00:00
nobu 05a157ed8a * regparse.c (parse_char_class): CCV_SB is only for single
byte.  [ruby-dev:36786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 23:56:40 +00:00
nobu 5e7203ea22 * regparse.c (parse_char_class): CCV_SB is only for single
byte.  [ruby-dev:36786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 22:45:17 +00:00
akr a953d28e3c * include/ruby/oniguruma.h (onigenc_get_prev_char_head): add end
argument.

* include/ruby/encoding.h (rb_enc_prev_char): ditto.

* regenc.c (onigenc_get_prev_char_head): add end argument.

* regparse.c: follow the interface change.

* regexec.c: ditto.

* string.c: ditto.

* parse.y: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 18:22:04 +00:00
mame eca8de632c * regparse.c (parse_exp): fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-12 11:02:21 +00:00
mame 2d1981b91f * regparse.c (parse_exp): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 12:30:28 +00:00
mame 0df6cb496a * regparse.c (parse_exp): fix memory leak at Regexp.new("x{1,1}").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 12:08:28 +00:00
nobu 4f572663c8 * regexec.c (stack_double): use MatchStackLimitSize atomically.
* regparse.c (onig_free_shared_cclass_table): OnigTypeCClassTable
  needs atomicity

* regsyntax.c: constified all predefined OnigSyntaxTypes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:21:44 +00:00
matz 44cd8e457b * regparse.c (PINC): use optimized enclen() instead of
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 08:25:03 +00:00
nobu 89c408704b * enumerator.c (enumerator_each, enumerator_with_index): suppress
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 13:49:43 +00:00
matz 52ed8c4edd * include/ruby/oniguruma.h: Oniguruma 1.9.1 merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03 15:55:04 +00:00
nobu a5c6b705db * regparse.c (i_apply_case_fold): fix for negative character class. a
patch from Yusuke ENDOH <mame AT tsg.ne.jp> in [ruby-core:13884].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05 16:37:25 +00:00
matz edd7c787ad * array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>.  [ruby-dev:31748]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06 12:33:45 +00:00
matz e1def8a987 * include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixes
some memory violation.  [ruby-dev:31070]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-23 09:39:30 +00:00
nobu ba563e4a41 * include/ruby/st.h, st.c (st_init_table, st_init_table_with_size):
constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 01:06:49 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
matz 6ee2e54239 * oniguruma.h: updated to Oniguruma 5.7.0.
* regsyntax.c, unicode.c: new files along with Oniguruma 5.x.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-23 01:32:08 +00:00
matz 33163ad123 * regparse.c, etc.: K&R to ANSI code cleanup patch from Stefan
Huehner <stefan at huehner.org>.  [ruby-core:10543]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 03:58:57 +00:00
kosako 92d805753b merge Oniguruma 4.4.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-28 11:15:41 +00:00
matz 41f3f0eb66 * parse.y (parser_warning, parser_warn): some error message may
contain format specifiers.  a patch from Akinori MUSHA <knu at
  iDaemons.org>.  [ruby-dev:29657]

* regparse.c (onig_rb_warning, onig_rb_warn): ditto.

* ext/bigdecimal/bigdecimal.c (VpException): ditto.

* ext/dl/handle.c (rb_dlhandle_initialize): ditto.

* ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-14 14:33:10 +00:00
kosako 0046f355c1 merge Oniguruma 4.4.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 12:58:22 +00:00
kosako d92db05a27 merge Oniguruma 4.2.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-05 13:54:40 +00:00
matz 9b383bd6cf * sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -> style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross <florg at florg.net>.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame->block.
  thanks to ts <decoux at moulon.inra.fr>.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  <rubypate at gmail.com>.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler <rubypate at gmail.com>.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts <sroberts at uniserve.com>.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable "beg" to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  <tommy at tmtm.org>.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  <stefan at huehner.org>.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui <naruse at airemix.com>.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew <meta at pobox.com>.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  <sndgk393 AT ybb.ne.jp>

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  <dlutter at redhat.com>.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel <drbrain at segment7.net>.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil <weil at mail.berlios.de>.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility "local".

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 21:20:17 +00:00
kosako f69c1f18ee merge Oniguruma 4.0.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-23 12:08:08 +00:00
kosako c37c5419d2 merge Oniguruma 4.0.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-12 15:05:19 +00:00
matz 086e235f03 * oniguruma.h: merge Oniguruma 4.0.0 [ruby-dev:28290]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-04 12:31:19 +00:00
matz 36fbf43b09 * regparse.c (fetch_token_in_cc): tok->escaped should be
initialized.  [ruby-dev:27763]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-20 13:42:57 +00:00
nobu 9c871d5a5a * enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c:
made internal symbols static.  [ruby-dev:27435]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18 17:35:18 +00:00
ocean dda5dc00cf * array.c: moved to ANSI function style from K&R function style.
(used protoize on windows, so still K&R remains on #ifdef part of
   other platforms. And  `foo _((boo))' stuff is still there)
   [ruby-dev:26975]

* bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c,
  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c,
  io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c,
  prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c,
  regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c,
  sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c,
  version.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12 10:44:21 +00:00
nobu 499c4e6120 * regparse.c (fetch_escaped_value): mask values following \c in
regexp.  fixed: [ruby-dev:26500]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-10 23:32:33 +00:00
ocean 002794959d * regparse.c (fetch_token): avoid warning of unused goto tag.
[ruby-dev:26389]

(patch from Kazuhiro NISHIYAMA)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-28 15:06:03 +00:00
akr 0fe7df5c2f * oniguruma.h (OnigWarnFunc): add a variadic argument.
[ruby-core:4751]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-24 16:23:15 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
ksaito be587c77ef * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, regerror.c, regexec.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma 3.7.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-23 12:47:23 +00:00
ksaito ad24e23548 * regparse.c (type_cclass_hash): (Thanks Nobu) fixed overrun. ([ruby-dev:25676]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-13 02:58:58 +00:00
ksaito a19d6b33d7 * ascii.c, euc_jp.c, hash.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, st.c, st.h, utf8.c: imported Oni Guruma 3.5.4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-28 15:21:48 +00:00
ksaito cb32ebe81c * regparse.c: now handles many alternatives (over 500000) in regexp. [ruby-dev:24773]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 15:16:20 +00:00
ksaito aa01c73689 * regparse.c (fetch_token): fixed test failure on HP-UX ia64 ([ruby-dev:24859]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28 03:16:16 +00:00
ksaito 09542e3269 * regparse.c, test/ruby/test_regexp.rb: fixed problem with UTF-8 characters that have U+00FE or invalid characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28 03:09:13 +00:00
ksaito 47548dd33e * regexec.c, regparse.c, regint.h: fixed conflicts between vendor branch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04 14:57:11 +00:00
ksaito 82cb9eaa3b * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c:
imported Oni Guruma 3.4.0.

* parse.y, re.c: Now mbclen() takes unsigned char as its argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04 14:43:08 +00:00
matz 3e9e2bd4ed * eval.c (rb_eval): NODE_XSTR should pass copy of literal string.
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
  deletion.

* enum.c (enum_sort_by): protect continuation jump in.
  [ruby-dev:24642]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30 06:56:18 +00:00
ksaito ce4078d5bd * oniguruma.h, regparse.c: imported Oni Guruma 2.2.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-27 16:37:56 +00:00
ksaito 4e85c0322a * oniguruma.h, regparse.c: imported Oni Guruma 2.2.7.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-27 16:18:06 +00:00
ksaito 62a7fde33b * regparse.c, oniguruma.h: imported Oni Guruma 2.2.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05 10:40:54 +00:00