diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-16 22:21:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-16 22:21:42 +0000 |
commit | 2ba22d68519872b18a3b61490b6b78e2a7aca013 (patch) | |
tree | 38ce2dd344237fb7ae4959a825f742a0aba87201 /.gdbinit | |
parent | 19620465b77e41286695a1f2d7d9edc39c4bb4c2 (diff) | |
download | ruby-2ba22d68519872b18a3b61490b6b78e2a7aca013.tar.gz ruby-2ba22d68519872b18a3b61490b6b78e2a7aca013.tar.xz ruby-2ba22d68519872b18a3b61490b6b78e2a7aca013.zip |
* .gdbinit (rp): REGEXP handling fixed.
* 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
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -86,11 +86,17 @@ define rp print (struct RString *)$arg0 else if ($flags & RUBY_T_MASK) == RUBY_T_REGEXP + set $regsrc = ((struct RRegexp*)$arg0)->src + set $rsflags = ((struct RBasic*)$regsrc)->flags printf "T_REGEXP: " set print address off - output ((struct RRegexp*)$arg0)->str + output (char *)(($rsflags & RUBY_FL_USER1) ? \ + ((struct RString*)$regsrc)->as.heap.ptr : \ + ((struct RString*)$regsrc)->as.ary) set print address on - printf " len:%ld ", ((struct RRegexp*)$arg0)->len + printf " len:%ld ", ($rsflags & RUBY_FL_USER1) ? \ + ((struct RString*)$regsrc)->as.heap.len : \ + (($rsflags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2) if $flags & RUBY_FL_USER6 printf "(none) " end |