summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-29 15:00:48 (GMT)
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-29 15:00:48 (GMT)
commit56d19a9e8bbdbd00eaa553b876db6718f641fb7d (patch)
tree5d6fb8d54acb0577d05f78a1e8cab4b94cfc30de /man
parent2a86c3e86a309b4fa82b22aa559a07a1e582e638 (diff)
* man/irb.1 (EXAMPLES): new section
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'man')
-rw-r--r--man/irb.118
1 files changed, 18 insertions, 0 deletions
diff --git a/man/irb.1 b/man/irb.1
index 6cc6d03..e8c2ab0 100644
--- a/man/irb.1
+++ b/man/irb.1
@@ -108,6 +108,24 @@ Personal irb initialization.
.Pp
.El
.Pp
+.Sh EXAMPLES
+.Dl % irb
+.Dl irb(main):001:0> Ic 1 + 1
+.Dl 2
+.Dl irb(main):002:0> Ic def t(x)
+.Dl irb(main):003:1> Ic x+1
+.Dl irb(main):004:1> Ic end
+.Dl => nil
+.Dl irb(main):005:0> Ic t(3)
+.Dl => 4
+.Dl irb(main):006:0> Ic if t(3) == 4
+.Dl irb(main):007:1> Ic p :ok
+.Dl irb(main):008:1> Ic end
+.Dl :ok
+.Dl => :ok
+.Dl irb(main):009:0> Ic quit
+.Dl %
+.Pp
.Sh SEE ALSO
.Xr ruby 1 .
.Pp