summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-14 02:16:05 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-14 02:16:05 +0000
commit05a4c6692210f6765edd2455f399187f58425e5a (patch)
tree49be8ce9daabf87062b5e14462dedc95e88eaac4
parent82a9dd2a482f7e0b7bbce2b958aed56088f859f8 (diff)
downloadruby-05a4c6692210f6765edd2455f399187f58425e5a.tar.gz
ruby-05a4c6692210f6765edd2455f399187f58425e5a.tar.xz
ruby-05a4c6692210f6765edd2455f399187f58425e5a.zip
add pretty_print
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/drb/drb.rb11
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e4f65c89a..2881dcb43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Feb 14 11:14:12 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * lib/drb/drb.rb: add pretty_print, thanks gotoken.
+
Fri Feb 13 21:51:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
* lib/fileutils.rb: slighly improved documentation (sync with 1.8)
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 80beb0244..ca32dfe90 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1030,6 +1030,17 @@ module DRb
raise result
end
end
+
+ def pretty_print(q) # :nodoc:
+ q.pp_object(self)
+ end
+
+ def pretty_print_cycle(q) # :nodoc:
+ q.object_address_group(self) {
+ q.breakable
+ q.text '...'
+ }
+ end
end
# Class handling the connection between a DRbObject and the