mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
.gdbinit: fix on empty strings [ci skip]
* .gdbinit (output_string): get rid of "Invalid number 0 of repetitions" error on empty strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0da52e5626
commit
4f1a54d2d7
1 changed files with 5 additions and 1 deletions
6
.gdbinit
6
.gdbinit
|
@ -446,9 +446,13 @@ define output_string
|
|||
set $len = ($flags & RUBY_FL_USER1) ? \
|
||||
((struct RString*)($arg0))->as.heap.len : \
|
||||
(($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
|
||||
output *(char *)(($flags & RUBY_FL_USER1) ? \
|
||||
if $len > 0
|
||||
output *(char *)(($flags & RUBY_FL_USER1) ? \
|
||||
((struct RString*)($arg0))->as.heap.ptr : \
|
||||
((struct RString*)($arg0))->as.ary) @ $len
|
||||
else
|
||||
output ""
|
||||
end
|
||||
end
|
||||
|
||||
define rp_string
|
||||
|
|
Loading…
Reference in a new issue