diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-01 21:54:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-01 21:54:16 +0000 |
commit | 96d953dbe8ee7b82a5f8fba3b1d728c7c048abd3 (patch) | |
tree | f536c1dcc42f5747a3dc2dfe328795d3a5252d3a /.gdbinit | |
parent | 1d83928804d270c47f8a37a39cfc2a422b7e922d (diff) | |
download | ruby-96d953dbe8ee7b82a5f8fba3b1d728c7c048abd3.tar.gz ruby-96d953dbe8ee7b82a5f8fba3b1d728c7c048abd3.tar.xz ruby-96d953dbe8ee7b82a5f8fba3b1d728c7c048abd3.zip |
* .gdbinit (rp): supports rational and complex numbers. it's
cheating since it uses rb_p().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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. |