summaryrefslogtreecommitdiff
path: root/re.c
AgeCommit message (Collapse)Author
2007-11-04* re.c (rb_reg_quote): quote \v as well.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04* re.c (rb_reg_initialize_m): use StringValuePtr instead ofakr
StringValueCStr because \0 exists when Regexp.new("\0"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-19* parse.y (parser_regx_options, reg_compile_gen): relaxened encodingnobu
matching rule. * re.c (rb_reg_initialize): always set encoding of Regexp. * re.c (rb_reg_initialize_str): fix enconding for non 7bit-clean strings. * re.c (rb_reg_initialize_m): use ascii encoding for 'n' option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-17* re.c (rb_reg_s_union): the last check was not complete.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-17* encoding.c (rb_enc_from_encoding, rb_enc_register): associate indexnobu
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* re.c (rb_reg_desc): set encoding.nobu
* re.c (rb_reg_s_union): check encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* re.c (rb_reg_initialize_m): allow binary encoding option.nobu
[ruby-dev:32083] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* re.c (rb_reg_s_union): check for encoding of original object.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* parse.y (parser_regx_options): check if regexp encoding optionnobu
matches to current encoding. * re.c (char_to_option, rb_char_to_option_kcode): 'n' is not kcode option now. * re.c (rb_reg_to_s, rb_reg_error_desc): copy encoding rather than append as an option. * re.c (make_regexp, rb_reg_prepare_re): use encoding of Regexp and String instead of kcode. * re.c (rb_reg_initialize): set fixed option if none is set. * re.c (rb_reg_regcomp): ditto. * re.c (rb_reg_equal): check if encodings are equal. * re.c (rb_reg_initialize_m): encoding option is obsolete. * re.c (rb_kcode, rb_get_kcode, rb_set_kcode): removed. * re.c (Init_Regexp): removed Regexp#kcode method. * ruby.c (proc_options): allow long encoding name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* re.c (rb_reg_s_union): encoding of all regexp objects shouldmatz
match. [ruby-dev:32076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-12* re.c (match_values_at): make #select to be alias to #values_atmatz
to adapt RDoc description. [ruby-core:12588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-10* re.c (rb_reg_s_quote): no longer takes optional second argumentmatz
that has never been documented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-08fix rdoc position of Regexp.union.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-06add an example for Regexp.union document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-06* insns.def (opt_eq): get rid of gcc bug.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-05* include/ruby/defines.h: no longer provide DEFAULT_KCODE.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-05* re.c (rb_reg_s_union_m): Regexp.union accepts single argument whichakr
is an array of patterns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04replace rb_memcicmp()matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04revert rb_memcmp() change to pacify GCC optimizermatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* re.c (rb_memcmp): no longer useful without ruby_ignorecase.matz
* re.c (rb_reg_prepare_re): revert recompile condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* re.c (kcode_setter): restore erroneously removed setter.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* re.c (ignorecase_setter): change warning message.matz
* re.c (ignorecase_getter): now gives warning. * string.c (rb_str_cmp_m): update RDoc document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* re.c (Init_Regexp): remove obsolete const alias: MatchingData.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* re.c (kcode_setter): Perl-ish global variable `$=' no longermatz
effective. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* encoding.c (rb_obj_encoding): returns encoding of the given object.nobu
* re.c (Init_Regexp): new method Regexp#encoding. * string.c (str_encoding): moved to encoding.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-29* re.c (Init_Regexp): test DEFAULT_KCODE in C code becauseakr
KCODE_EUC, etc are enum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-20* re.c (rb_reg_match_m): evaluate a block if match. it would makematz
condition statement much shorter, if no else clause is needed. * string.c (rb_str_match_m): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06* array.c (rb_ary_cycle): typo in rdoc. a patch from Yuguimatz
<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-08-29* string.c (str_gsub): should not use mbclen2() which has broken API.matz
* re.c: remove rb_reg_mbclen2(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29* re.c (rb_reg_mbclen2): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28* string.c (rb_str_subseq): retrieve substring based on byte offset.matz
* string.c (rb_str_rindex_m): was confusing character offset and byte offset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* parse.y, re.c: re-applied revision 13092.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* array.c (rb_ary_s_try_convert): more document description.matz
* re.c (rb_reg_s_try_convert): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* array.c (rb_ary_s_try_convert): a new class method to convertmatz
object or nil if it's not target-type. this mechanism is used to convert types in the C implemented methods. * hash.c (rb_hash_s_try_convert): ditto. * io.c (rb_io_s_try_convert): ditto. * re.c (rb_reg_s_try_convert): ditto. * string.c (rb_str_s_try_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* parse.y (reg_compile_gen): obtain error info from errinfo.nobu
* re.c (rb_reg_error_desc): make RegexpError for initialization error. * re.c (rb_reg_compile): return nil and set errinfo if error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-02* re.c (option_to_str, arg_kcode, opt_kcode): options conversionnobu
between int and string. * re.c (rb_reg_compile): append regexp options to error message. [ruby-dev:31334] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-02* parse.y (reg_compile_gen): set error if failed to compile regexpnobu
literal. [ruby-dev:31336] * re.c (rb_reg_compile): should not use regexp which could not get initialized. [ruby-dev:31333] return error message to let the parser know it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu
eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-23update document to follow MatchData#inspect implementation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-23* re.c (match_inspect): MatchData#inspect implemented.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,nobu
pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci, thread_pthread.ci, thread_win32.ci: fixed indentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-23* oniguruma.h: updated to Oniguruma 5.7.0.matz
* 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-02-14* re.c (reg_operand): allow symbols to be operands for regularmatz
expression matches. * string.c (Init_String): allow Symbol#===. * lib/date/format.rb (Date::Format::Bag::to_hash): string added prefixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18* dir.c (dir_s_glob): restore GC protection volatile variable.matz
[ruby-dev:29588] * re.c (rb_reg_regcomp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18* dir.c (dir_s_glob): remove unused variable.matz
* math.c (math_log): ditto. * re.c (rb_reg_regcomp): ditto. * eval.c (break_jump): ditto. * eval.c (rb_thread_yield_0): remove unused function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-20* object.c (rb_mod_attr): make Module#attr to be an alias tomatz
attr_reader. [RCR#331] * ruby.h: export classes/modules to implement sandbox. [ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz
<stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e