aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
Commit message (Collapse)AuthorAgeFilesLines
* use RB_TYPE_P() instead of comparison of TYPE()nobu2012-05-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_equal): Removed incorrect example for Regexp#== withdrbrain2012-05-081-1/+1
| | | | | | | "n" option. [ruby-talk - Bug #6415] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain2012-04-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]marcandre2012-03-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * array.c: Use rb_check_arity / rb_error_arity * class.c: ditto * enumerator.c: ditto * eval.c: ditto * file.c: ditto * hash.c: ditto * numeric.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * re.c: ditto * signal.c: ditto * string.c: ditto * struct.c: ditto * transcode.c: ditto * vm_eval.c: ditto * vm_insnhelper.c: ditto & implementation of rb_error_arity * test/ruby/test_arity.rb: tests for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_objspace_free): global_List is allocated with xmalloc.naruse2012-01-081-1/+1
| | | | | | | | | | | | | | | | | | | patched by Sokolov Yura. https://github.com/ruby/ruby/pull/78 * dln_find.c: remove useless replacement of free. * ext/readline/readline.c (readline_attempted_completion_function): strings for readline must allocated with malloc. * process.c (run_exec_dup2): use free; see also r20950. * re.c (onig_new_with_source): use malloc for oniguruma. * vm.c (ruby_vm_destruct): use free for VMs. * vm.c (thread_free): use free for threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_initialize): fix indent.nobu2011-11-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_aref): Use <code> around indexing examples to preventdrbrain2011-10-241-5/+6
| | | | | | | hyperlinks. [ruby-talk:389396] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * use RB_TYPE_P which is optimized for constant types, instead ofnobu2011-09-291-3/+3
| | | | | | comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: declare internal functions here.akr2011-06-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_match): fix rdoc of Regexp#=~.naruse2011-05-291-2/+2
| | | | | | patched by Tsuyoshi Sawada. [Bug #4781] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (Init_Regexp): Document option constants. Patch by Vincentdrbrain2011-05-121-0/+5
| | | | | | | | | | | | | | | | | | Batts. [Ruby 1.9 - Bug #4677] * lib/uri/common.rb (module URI): Documentation for URI. Patch by Vincent Batts. [Ruby 1.9- Bug #4677] * lib/uri/ftp.rb (module URI): ditto * lib/uri/generic.rb (module URI): ditto * lib/uri/http.rb (module URI): ditto * lib/uri/https.rb (module URI): ditto * lib/uri/ldap.rb (module URI): ditto * lib/uri/ldaps.rb (module URI): ditto * lib/uri/mailto.rb (module URI): ditto * process.c (Init_process): Document Process constants. Patch by Vincent Batts. [Ruby 1.9- Bug #4677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (Init_Regexp): added a constant for ARG_ENCODING_NONEtenderlove2011-02-021-0/+1
| | | | | | | [ruby-core:35054] * test/ruby/test_regexp.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_raise): add GC guard to prevent intermediatekosaki2011-01-271-1/+1
| | | | | | | | variable from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Sorry, commit miss of r30412.usa2010-12-291-1/+4
| | | | | | | * re.c (rb_reg_expr_str): need to escape if the coderage is invalid. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c: parenthesize macro arguments.akr2010-12-271-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "* re.c (rb_reg_initialize): don't set US-ASCII to regexp"naruse2010-12-021-0/+3
| | | | | | This reverts commit r30058. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_initialize): don't set US-ASCII to regexpnaruse2010-12-021-3/+0
| | | | | | | when parser make initially compile a regexp. Usually regexp are used for the same of its script encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_initialize_str): should succeed the taint status fromusa2010-11-261-0/+1
| | | | | | | the origin. [ruby-core:33338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rand_init): remove useless assignment.naruse2010-10-041-4/+1
| | | | | | | | * re.c (update_char_offset): remove unused variable. * re.c (read_escaped_byte): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_search): fix: 4th argument should be regexpnaruse2010-08-231-1/+1
| | | | | | object. patched by shintaro kuwamoto [ruby-dev:41667] #3459 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): fixed out-of-boundary access at invalidnobu2010-07-231-6/+9
| | | | | | multibyte characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): fix broken Regexp#inspect when itnaruse2010-07-221-1/+2
| | | | | | | | is ASCII-8BIT and non-ASCII character. The length of character should be from original byte string. [ruby-core:31431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): ASCII incompatible stringsnaruse2010-06-051-21/+52
| | | | | | | | | | | must always escape or converted. * re.c (rb_reg_expr_str): use rb_str_buf_cat_escaped_char when resenc is given: for Regexp#inspect or error message. * re.c (rb_reg_desc): add 'n' for ENCODING_NONE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (unescape_nonascii): \P{FOO} is also Unicode regexp. [ruby-core:30540]naruse2010-06-011-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_s_union_m): update rdoc. [ruby-dev:41354]mame2010-05-201-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_lambda, unnamed_parameters): Small documentation fixes.marcandre2010-05-171-2/+2
| | | | | | | | | | * re.c: ditto * string.c: ditto * time.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_initialize_m): fix wrong index for the langnaruse2010-05-121-1/+1
| | | | | | option's value 'N'. reported by Masaya TARUI via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add description about Regexp(str, opt, lang). [ruby-core:29893]naruse2010-05-111-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c: RDoc for subclasses of Exception. [ruby-core:28394]marcandre2010-05-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | * cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrongmarcandre2010-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | number of arguments * file.c (rb_f_test, rb_file_s_umask): ditto * numeric.c (int_chr, num_step): ditto * process.c (rb_f_sleep): ditto * re.c (rb_reg_initialize_m): ditto * signal.c (rb_f_kill, sig_trap): ditto * string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang, rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto * proc.c (curry): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc: Import RDoc 2.5.2drbrain2010-04-101-3/+1
| | | | | | | | | | * lib/rdoc/parser/ruby.rb (RDoc::Parser::Ruby): Don't parse rdoc files, reverts r24976 in favor of include directive support in C parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (make_regexp): use onig_new_with_source to keepnaruse2010-04-051-2/+24
| | | | | | | | | sourcefile and sourceline. * re.c (onig_new_with_source): copied from onig_new in regcomp.c for keep sourcefile and sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_to_s): remove unused variable.naruse2010-03-091-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.matz2010-03-011-20/+8
| | | | | | | | * 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
* * marshal.c (r_object0): register regexp object before encodingnobu2010-02-131-3/+14
| | | | | | | | | name. [ruby-dev:40414] * re.c (rb_reg_alloc, rb_reg_init_str): split from rb_reg_new_str. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_aref): fixed indent.nobu2010-02-131-27/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed spaces just before tabs.nobu2009-11-261-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (last_match): add "thread and method" to the scope.naruse2009-09-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (last_match): Added note to the doc that last_match is local to ↵marcandre2009-09-291-0/+3
| | | | | | current scope [ruby-core:25833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/re.rb: New document for Ruby's fork of Oniguruma.naruse2009-09-171-0/+3
| | | | | | | | | | written by Run Paint Run Run [ruby-core:25420] * re.c: import document in doc/re.rb. * .document: add doc/re.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_char_to_option_kcode): ASCII-8BIT should also delay.naruse2009-09-101-2/+2
| | | | | | | * re.c (parser_regx_options): return rb_ascii8bit_encindex on ASCII-8BIT. [ruby-dev:39300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_hash): must calculate hash.nobu2009-09-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/st.h (st_hash_func): use st_index_t.nobu2009-09-081-15/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (Init_Regexp): new methods. [ruby-core:24748]nobu2009-09-051-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (update_char_offset): position should be long.nobu2009-09-041-0/+49
| | | | | | | | | | * re.c (match_hash, match_equal): new methods. [ruby-core:24748] * re.c (reg_match_pos, rb_reg_eqq, rb_reg_s_quote): get rid of use VALUE as int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (update_char_offset):nobu2009-09-041-5/+5
| | | | | | | | | | | | * re.c (rb_reg_equal): * re.c (reg_match_pos): * re.c (rb_reg_eqq): * re.c (static VALUE): * re.c (Init_Regexp): [ruby-core:24748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *regparse.c (CC_DUP_WARN): use rb_compile_warn if ScanEnv has sourcenaruse2009-08-301-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * re.c (rb_reg_preprocess_dregexp): set encoding as ASCII-8BITnaruse2009-08-271-3/+5
| | | | | | when /n is specified and the embeded string is escaped text. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_preprocess_dregexp): change Exception class tonaruse2009-08-141-1/+1
| | | | | | | | | | RegexpError. * test/ruby/test_m17n.rb (test_regexp_usascii): follow above. * test/ruby/test_m17n.rb (test_regexp_embed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e