View | Details | Raw Unified | Return to bug 241555 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +15 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	irb
3
PORTNAME=	irb
4
PORTVERSION=	1.0.0
4
PORTVERSION=	1.0.0
5
PORTREVISION=	1
5
CATEGORIES=	devel rubygems
6
CATEGORIES=	devel rubygems
6
MASTER_SITES=	RG
7
MASTER_SITES=	RG
7
8
Lines 16-23 Link Here
16
17
17
NO_ARCH=	yes
18
NO_ARCH=	yes
18
19
19
# irb executable is installed by ruby port
20
PLIST_FILES=	bin/irb \
20
post-install:
21
		${GEMS_DIR}/man/irb.1
21
	${RM} ${STAGEDIR}${PREFIX}/bin/irb
22
GEM_MANUALS_SEC1=	${GEMS_DIR}/man/irb.1
22
23
23
.include <bsd.port.mk>
24
.include <bsd.port.pre.mk>
25
26
.if ${RUBY_VER} < 2.6
27
IGNORE=		irb is included in ruby port
28
.endif
29
30
pre-install:
31
	${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_DIR}/man
32
	${INSTALL_DATA} ${FILESDIR}/irb.1 ${STAGEDIR}${PREFIX}/${GEMS_DIR}/man
33
34
.include <bsd.port.post.mk>
(-)files/irb.1 (+172 lines)
Line 0 Link Here
1
.\"Ruby is copyrighted by Yukihiro Matsumoto <matz@netlab.jp>.
2
.Dd April 20, 2017
3
.Dt IRB \&1 "Ruby Programmer's Reference Guide"
4
.Os UNIX
5
.Sh NAME
6
.Nm irb
7
.Nd Interactive Ruby Shell
8
.Sh SYNOPSIS
9
.Nm
10
.Op Fl -version
11
.Op Fl dfm
12
.Op Fl I Ar directory
13
.Op Fl r Ar library
14
.Op Fl - Ns Oo no Oc Ns inspect
15
.Op Fl - Ns Oo no Oc Ns readline
16
.Op Fl -prompt Ar mode
17
.Op Fl -prompt-mode Ar mode
18
.Op Fl -inf-ruby-mode
19
.Op Fl -simple-prompt
20
.Op Fl -noprompt
21
.Op Fl -tracer
22
.Op Fl -back-trace-limit Ar n
23
.Op Fl -irb_debug Ar n
24
.Op Fl -
25
.Op program_file
26
.Op argument ...
27
.Pp
28
.Sh DESCRIPTION
29
.Nm
30
is the REPL(read-eval-print loop) environment for Ruby programs.
31
.Pp
32
.Sh OPTIONS
33
.Bl -tag -width "1234567890123" -compact
34
.Pp
35
.It Fl -version
36
Prints the version of
37
.Nm .
38
.Pp
39
.It Fl E Ar external Ns Op : Ns Ar internal
40
.It Fl -encoding Ar external Ns Op : Ns Ar internal
41
Same as `ruby -E' .
42
Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:).
43
.Pp
44
You can omit the one for internal encodings, then the value
45
.Pf ( Li "Encoding.default_internal" ) will be nil.
46
.Pp
47
.It Fl I Ar path
48
Same as `ruby -I' .
49
Specifies
50
.Li $LOAD_PATH
51
directory
52
.Pp
53
.It Fl U
54
Same as `ruby -U' .
55
Sets the default value for internal encodings
56
.Pf ( Li "Encoding.default_internal" ) to UTF-8.
57
.Pp
58
.It Fl d
59
Same as `ruby -d' .
60
Sets
61
.Li $DEBUG
62
to true.
63
.Pp
64
.It Fl f
65
Suppresses read of
66
.Pa ~/.irbrc .
67
.Pp
68
.It Fl h
69
.It Fl -help
70
Prints a summary of the options.
71
.Pp
72
.It Fl r Ar library
73
Same as `ruby -r'.
74
Causes irb to load the library using require.
75
.Pp
76
.It Fl -inspect
77
Uses `inspect' for output (default except for bc mode)
78
.Pp
79
.It Fl -noinspect
80
Doesn't use inspect for output
81
.Pp
82
.It Fl -readline
83
Uses Readline extension module.
84
.Pp
85
.It Fl -noreadline
86
Doesn't use Readline extension module.
87
.Pp
88
.It Fl -prompt Ar mode
89
.It Fl -prompt-mode Ar mode
90
Switch prompt mode. Pre-defined prompt modes are
91
`default', `simple', `xmp' and `inf-ruby'.
92
.Pp
93
.It Fl -inf-ruby-mode
94
Uses prompt appropriate for inf-ruby-mode on emacs.
95
Suppresses --readline.
96
.Pp
97
.It Fl -simple-prompt
98
Makes prompts simple.
99
.Pp
100
.It Fl -noprompt
101
No prompt mode.
102
.Pp
103
.It Fl -tracer
104
Displays trace for each execution of commands.
105
.Pp
106
.It Fl -back-trace-limit Ar n
107
Displays backtrace top
108
.Ar n
109
and tail
110
.Ar n Ns .
111
The default value is 16.
112
.Pp
113
.It Fl -irb_debug Ar n
114
Sets internal debug level to n (not for popular use)
115
.Pp
116
.El
117
.Pp
118
.Sh ENVIRONMENT
119
.Bl -tag -compact
120
.It Ev IRBRC
121
.Pp
122
.El
123
.Pp
124
Also
125
.Nm
126
depends on same variables as
127
.Xr ruby 1 .
128
.Pp
129
.Sh FILES
130
.Bl -tag -compact
131
.It Pa ~/.irbrc
132
Personal irb initialization.
133
.Pp
134
.El
135
.Pp
136
.Sh EXAMPLES
137
.Dl % irb
138
.Dl irb(main):001:0> Ic 1 + 1
139
.Dl 2
140
.Dl irb(main):002:0> Ic def t(x)
141
.Dl irb(main):003:1> Ic   x+1
142
.Dl irb(main):004:1> Ic end
143
.Dl => :t
144
.Dl irb(main):005:0> Ic t(3)
145
.Dl => 4
146
.Dl irb(main):006:0> Ic if t(3) == 4
147
.Dl irb(main):007:1> Ic p :ok
148
.Dl irb(main):008:1> Ic end
149
.Dl :ok
150
.Dl => :ok
151
.Dl irb(main):009:0> Ic quit
152
.Dl %
153
.Pp
154
.Sh SEE ALSO
155
.Xr ruby 1 .
156
.Pp
157
.Sh REPORTING BUGS
158
.Bl -bullet
159
.It
160
Security vulnerabilities should be reported via an email to
161
.Mt security@ruby-lang.org .
162
Reported problems will be published after being fixed.
163
.Pp
164
.It
165
Other bugs and feature requests can be reported via the
166
Ruby Issue Tracking System
167
.Pq Lk https://bugs.ruby-lang.org/ .
168
Do not report security vulnerabilities
169
via this system because it publishes the vulnerabilities immediately.
170
.El
171
.Sh AUTHORS
172
Written by Keiju ISHITSUKA.

Return to bug 241555