From 339dca41fc7e4b0203e0d916eab84693f2a4187e Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 1 Apr 2008 21:54:16 +0000 Subject: * .gdbinit (rp): supports rational and complex numbers. it's cheating since it uses rb_p(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- .gdbinit | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.gdbinit') diff --git a/.gdbinit b/.gdbinit index c0a434ad10..1198ebace9 100644 --- a/.gdbinit +++ b/.gdbinit @@ -143,6 +143,14 @@ define rp ((struct RBignum*)$arg0)->as.ary : \ ((struct RBignum*)$arg0)->as.heap.digits) else + if ($flags & RUBY_T_MASK) == RUBY_T_RATIONAL + printf "T_RATIONAL: " + rb_p $arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_COMPLEX + printf "T_COMPLEX: " + rb_p $arg0 + else if ($flags & RUBY_T_MASK) == RUBY_T_FILE printf "T_FILE: " print (struct RFile *)$arg0 @@ -220,6 +228,8 @@ define rp end end end + end + end end document rp Print a Ruby's VALUE. -- cgit v1.2.3