1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

10 commits

Author SHA1 Message Date
akr
7a7c26be73 document named capture of MatchData#{offset,begin,end,inspect}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09 07:35:54 +00:00
akr
18d8fbac54 * re.c (match_backref_number): new function for converting a backref
name/number to an integer.
  (match_offset): use match_backref_number.
  (match_begin): ditto.
  (match_end): ditto.
  (name_to_backref_number): raise IndexError instead of RuntimeError.
  (match_inspect): show capture index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09 07:12:44 +00:00
akr
f1b7e60cb9 * encoding.c (rb_enc_mbclen): make it never fail.
(rb_enc_nth): don't check the return value of rb_enc_mbclen.
  (rb_enc_strlen): ditto.
  (rb_enc_precise_mbclen): return needmore(1) if e <= p.
  (rb_enc_get_ascii): new function for extracting ASCII character.

* include/ruby/encoding.h (rb_enc_get_ascii): declared.

* include/ruby/regex.h (ismbchar): removed.

* re.c (rb_reg_expr_str): use rb_enc_get_ascii.
  (unescape_escaped_nonascii): use rb_enc_precise_mbclen to determine
  the termination of escaped non-ASCII character.
  (unescape_nonascii): use rb_enc_precise_mbclen.
  (rb_reg_quote): use rb_enc_get_ascii.
  (rb_reg_regsub): use rb_enc_get_ascii.

* string.c (rb_str_reverse) don't check the return value of
  rb_enc_mbclen.
  (rb_str_split_m): don't call rb_enc_mbclen with e <= p.

* parse.y (is_identchar): use ISASCII.
  (parser_ismbchar): removed.
  (parser_precise_mbclen): new macro.
  (parser_isascii): new macro.
  (parser_tokadd_mbchar): use parser_precise_mbclen to check invalid
  character precisely.
  (parser_tokadd_string): use parser_isascii.
  (parser_yylex): ditto.
  (is_special_global_name): don't call is_identchar with e <= p.
  (rb_enc_symname_p): ditto.

  [ruby-dev:32455]

* ext/tk/sample/tkextlib/vu/canvSticker2.rb: remove coding cookie
  because the encoding is not UTF-8.  [ruby-dev:32475]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-08 02:50:43 +00:00
ko1
9c7aab17a5 * eval.c (rb_method_missing): fix stack trace.
* bootstraptest/test_knownbug.rb: move solved tests.
* bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 01:47:34 +00:00
ko1
1e4278c98d * bootstraptest/test_knownbug.rb: move solved tests.
* bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb:
  ditto.
* test/ruby/test_integer.rb, test_regexp.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 08:33:32 +00:00
tadf
cbc22bf9bd added an assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-05 04:06:08 +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
5fb312bd18 * regexec.c, test/ruby/test_regexp.rb: fixed segmentation falut ([ruby-dev:24887]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28 03:07:48 +00:00
akr
7dc3169658 add a test for a problem of [ruby-talk:116455]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29 23:22:57 +00:00
akr
1bc4363c5e add test for [ruby-dev:24643].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29 22:45:13 +00:00