summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-01 21:54:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-01 21:54:16 +0000
commit339dca41fc7e4b0203e0d916eab84693f2a4187e (patch)
treef536c1dcc42f5747a3dc2dfe328795d3a5252d3a
parenta4d6f2265a98feba2d336c9d6faa7df38fe630d3 (diff)
* .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
-rw-r--r--.gdbinit10
-rw-r--r--ChangeLog5
2 files changed, 15 insertions, 0 deletions
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.
diff --git a/ChangeLog b/ChangeLog
index eed6ad6644..b6dfc05418 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 2 06:52:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * .gdbinit (rp): supports rational and complex numbers. it's
+ cheating since it uses rb_p().
+
Wed Apr 2 06:24:06 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* include/ruby/node.h: add new constants for rb_call()'s scope.