irb 1.14.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rdoc_options +5 -0
- data/CONTRIBUTING.md +52 -0
- data/EXTEND_IRB.md +3 -0
- data/Gemfile +11 -1
- data/README.md +13 -293
- data/doc/COMMAND_LINE_OPTIONS.md +69 -0
- data/doc/COMPARED_WITH_PRY.md +22 -0
- data/doc/Configurations.md +274 -0
- data/doc/EXTEND_IRB.md +122 -0
- data/doc/Index.md +705 -0
- data/doc/irb/irb.rd.ja +1 -1
- data/lib/irb/color.rb +251 -162
- data/lib/irb/color_printer.rb +10 -9
- data/lib/irb/command/base.rb +46 -13
- data/lib/irb/command/copy.rb +83 -0
- data/lib/irb/command/debug.rb +8 -6
- data/lib/irb/command/help.rb +1 -1
- data/lib/irb/command/history.rb +1 -1
- data/lib/irb/command/internal_helpers.rb +7 -4
- data/lib/irb/command/ls.rb +29 -15
- data/lib/irb/completion.rb +81 -57
- data/lib/irb/context.rb +132 -53
- data/lib/irb/debug/ui.rb +2 -4
- data/lib/irb/debug.rb +9 -12
- data/lib/irb/default_commands.rb +19 -8
- data/lib/irb/easter-egg.rb +13 -7
- data/lib/irb/ext/multi-irb.rb +2 -0
- data/lib/irb/history.rb +84 -55
- data/lib/irb/init.rb +7 -2
- data/lib/irb/input-method.rb +167 -130
- data/lib/irb/inspector.rb +42 -36
- data/lib/irb/lc/help-message +2 -2
- data/lib/irb/lc/ja/help-message +4 -4
- data/lib/irb/nesting_parser.rb +364 -213
- data/lib/irb/pager.rb +137 -7
- data/lib/irb/ruby-lex.rb +230 -302
- data/lib/irb/ruby_logo.aa +79 -37
- data/lib/irb/source_finder.rb +15 -22
- data/lib/irb/startup_message.rb +83 -0
- data/lib/irb/statement.rb +21 -0
- data/lib/irb/version.rb +2 -2
- data/lib/irb/workspace.rb +22 -31
- data/lib/irb.rb +148 -986
- data/man/irb.1 +37 -2
- metadata +42 -12
- data/.document +0 -4
- data/Rakefile +0 -54
- data/bin/console +0 -6
- data/bin/setup +0 -6
- data/irb.gemspec +0 -46
data/man/irb.1
CHANGED
|
@@ -180,7 +180,7 @@ The default value is 16.
|
|
|
180
180
|
.El
|
|
181
181
|
.Pp
|
|
182
182
|
.Sh ENVIRONMENT
|
|
183
|
-
.Bl -tag -compact -width "
|
|
183
|
+
.Bl -tag -compact -width "IRB_USE_AUTOCOMPLETE"
|
|
184
184
|
.It Ev IRB_LANG
|
|
185
185
|
The locale used for
|
|
186
186
|
.Nm .
|
|
@@ -190,10 +190,45 @@ The path to the personal initialization file.
|
|
|
190
190
|
.Pp
|
|
191
191
|
.It Ev XDG_CONFIG_HOME
|
|
192
192
|
.Nm
|
|
193
|
-
respects XDG_CONFIG_HOME. If
|
|
193
|
+
respects XDG_CONFIG_HOME. If it is set and
|
|
194
|
+
.Ev IRBRC
|
|
195
|
+
is unset, load
|
|
194
196
|
.Pa $XDG_CONFIG_HOME/irb/irbrc
|
|
195
197
|
as a personal initialization file.
|
|
196
198
|
.Pp
|
|
199
|
+
.It Ev RI_PAGER
|
|
200
|
+
The command specified would be used as a pager.
|
|
201
|
+
.Pp
|
|
202
|
+
.It Ev PAGER
|
|
203
|
+
The command specified would be used as a pager if
|
|
204
|
+
.Ev RI_PAGER
|
|
205
|
+
is unset.
|
|
206
|
+
.Pp
|
|
207
|
+
.It Ev VISUAL
|
|
208
|
+
Its value would be used to open files by the edit command.
|
|
209
|
+
.Pp
|
|
210
|
+
.It Ev EDITOR
|
|
211
|
+
Its value would be used to open files by the edit command if
|
|
212
|
+
.Ev VISUAL
|
|
213
|
+
is unset.
|
|
214
|
+
.Pp
|
|
215
|
+
.It Ev NO_COLOR
|
|
216
|
+
Assigning a value to it disables colorization.
|
|
217
|
+
.Pp
|
|
218
|
+
.It Ev IRB_USE_AUTOCOMPLETE
|
|
219
|
+
Assigning
|
|
220
|
+
.Sy false
|
|
221
|
+
to it disables autocompletion.
|
|
222
|
+
.Pp
|
|
223
|
+
.It Ev IRB_COMPLETOR
|
|
224
|
+
Autocompletion behavior. Allowed values are
|
|
225
|
+
.Sy regexp
|
|
226
|
+
or
|
|
227
|
+
.Sy type
|
|
228
|
+
.
|
|
229
|
+
.Pp
|
|
230
|
+
.It Ev IRB_COPY_COMMAND
|
|
231
|
+
Overrides the default program used to interface with the system clipboard.
|
|
197
232
|
.El
|
|
198
233
|
.Pp
|
|
199
234
|
Also
|
metadata
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: irb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- aycabta
|
|
8
8
|
- Keiju ISHITSUKA
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: prism
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.3.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.3.0
|
|
14
27
|
- !ruby/object:Gem::Dependency
|
|
15
28
|
name: reline
|
|
16
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,6 +52,20 @@ dependencies:
|
|
|
39
52
|
- - ">="
|
|
40
53
|
- !ruby/object:Gem::Version
|
|
41
54
|
version: 4.0.0
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: pp
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 0.6.0
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 0.6.0
|
|
42
69
|
description: Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
|
|
43
70
|
email:
|
|
44
71
|
- aycabta@gmail.com
|
|
@@ -48,17 +75,20 @@ executables:
|
|
|
48
75
|
extensions: []
|
|
49
76
|
extra_rdoc_files: []
|
|
50
77
|
files:
|
|
51
|
-
- ".
|
|
78
|
+
- ".rdoc_options"
|
|
79
|
+
- CONTRIBUTING.md
|
|
80
|
+
- EXTEND_IRB.md
|
|
52
81
|
- Gemfile
|
|
53
82
|
- LICENSE.txt
|
|
54
83
|
- README.md
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
84
|
+
- doc/COMMAND_LINE_OPTIONS.md
|
|
85
|
+
- doc/COMPARED_WITH_PRY.md
|
|
86
|
+
- doc/Configurations.md
|
|
87
|
+
- doc/EXTEND_IRB.md
|
|
88
|
+
- doc/Index.md
|
|
58
89
|
- doc/irb/irb-tools.rd.ja
|
|
59
90
|
- doc/irb/irb.rd.ja
|
|
60
91
|
- exe/irb
|
|
61
|
-
- irb.gemspec
|
|
62
92
|
- lib/irb.rb
|
|
63
93
|
- lib/irb/cmd/nop.rb
|
|
64
94
|
- lib/irb/color.rb
|
|
@@ -72,6 +102,7 @@ files:
|
|
|
72
102
|
- lib/irb/command/chws.rb
|
|
73
103
|
- lib/irb/command/context.rb
|
|
74
104
|
- lib/irb/command/continue.rb
|
|
105
|
+
- lib/irb/command/copy.rb
|
|
75
106
|
- lib/irb/command/debug.rb
|
|
76
107
|
- lib/irb/command/delete.rb
|
|
77
108
|
- lib/irb/command/disable_irb.rb
|
|
@@ -128,6 +159,7 @@ files:
|
|
|
128
159
|
- lib/irb/ruby-lex.rb
|
|
129
160
|
- lib/irb/ruby_logo.aa
|
|
130
161
|
- lib/irb/source_finder.rb
|
|
162
|
+
- lib/irb/startup_message.rb
|
|
131
163
|
- lib/irb/statement.rb
|
|
132
164
|
- lib/irb/version.rb
|
|
133
165
|
- lib/irb/workspace.rb
|
|
@@ -141,9 +173,8 @@ licenses:
|
|
|
141
173
|
metadata:
|
|
142
174
|
homepage_uri: https://github.com/ruby/irb
|
|
143
175
|
source_code_uri: https://github.com/ruby/irb
|
|
144
|
-
documentation_uri: https://github.
|
|
176
|
+
documentation_uri: https://ruby.github.io/irb/
|
|
145
177
|
changelog_uri: https://github.com/ruby/irb/releases
|
|
146
|
-
post_install_message:
|
|
147
178
|
rdoc_options: []
|
|
148
179
|
require_paths:
|
|
149
180
|
- lib
|
|
@@ -158,8 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
189
|
- !ruby/object:Gem::Version
|
|
159
190
|
version: '0'
|
|
160
191
|
requirements: []
|
|
161
|
-
rubygems_version: 3.
|
|
162
|
-
signing_key:
|
|
192
|
+
rubygems_version: 3.6.7
|
|
163
193
|
specification_version: 4
|
|
164
194
|
summary: Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
|
|
165
195
|
test_files: []
|
data/.document
DELETED
data/Rakefile
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
2
|
-
require "rake/testtask"
|
|
3
|
-
require "rdoc/task"
|
|
4
|
-
|
|
5
|
-
Rake::TestTask.new(:test) do |t|
|
|
6
|
-
t.libs << "test" << "test/lib"
|
|
7
|
-
t.libs << "lib"
|
|
8
|
-
t.ruby_opts << "-rhelper"
|
|
9
|
-
t.test_files = FileList["test/irb/**/test_*.rb"]
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# To make sure they have been correctly setup for Ruby CI.
|
|
13
|
-
desc "Run each irb test file in isolation."
|
|
14
|
-
task :test_in_isolation do
|
|
15
|
-
failed = false
|
|
16
|
-
|
|
17
|
-
FileList["test/irb/**/test_*.rb"].each do |test_file|
|
|
18
|
-
ENV["TEST"] = test_file
|
|
19
|
-
begin
|
|
20
|
-
Rake::Task["test"].execute
|
|
21
|
-
rescue
|
|
22
|
-
failed = true
|
|
23
|
-
msg = "Test '#{test_file}' failed when being executed in isolation. Please make sure 'rake test TEST=#{test_file}' passes."
|
|
24
|
-
separation_line = '=' * msg.length
|
|
25
|
-
|
|
26
|
-
puts <<~MSG
|
|
27
|
-
#{separation_line}
|
|
28
|
-
#{msg}
|
|
29
|
-
#{separation_line}
|
|
30
|
-
MSG
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
fail "Some tests failed when being executed in isolation" if failed
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
Rake::TestTask.new(:test_yamatanooroti) do |t|
|
|
38
|
-
t.libs << 'test' << "test/lib"
|
|
39
|
-
t.libs << 'lib'
|
|
40
|
-
#t.loader = :direct
|
|
41
|
-
t.ruby_opts << "-rhelper"
|
|
42
|
-
t.pattern = 'test/irb/yamatanooroti/test_*.rb'
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
task :default => :test
|
|
46
|
-
|
|
47
|
-
RDoc::Task.new do |rdoc|
|
|
48
|
-
rdoc.title = "IRB"
|
|
49
|
-
rdoc.rdoc_files.include("*.md", "lib/**/*.rb")
|
|
50
|
-
rdoc.rdoc_files.exclude("lib/irb/xmp.rb")
|
|
51
|
-
rdoc.rdoc_dir = "docs"
|
|
52
|
-
rdoc.main = "README.md"
|
|
53
|
-
rdoc.options.push("--copy-files", "LICENSE.txt")
|
|
54
|
-
end
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/irb.gemspec
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
begin
|
|
2
|
-
require_relative "lib/irb/version"
|
|
3
|
-
rescue LoadError
|
|
4
|
-
# for Ruby core repository
|
|
5
|
-
require_relative "version"
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
Gem::Specification.new do |spec|
|
|
9
|
-
spec.name = "irb"
|
|
10
|
-
spec.version = IRB::VERSION
|
|
11
|
-
spec.authors = ["aycabta", "Keiju ISHITSUKA"]
|
|
12
|
-
spec.email = ["aycabta@gmail.com", "keiju@ruby-lang.org"]
|
|
13
|
-
|
|
14
|
-
spec.summary = %q{Interactive Ruby command-line tool for REPL (Read Eval Print Loop).}
|
|
15
|
-
spec.description = %q{Interactive Ruby command-line tool for REPL (Read Eval Print Loop).}
|
|
16
|
-
spec.homepage = "https://github.com/ruby/irb"
|
|
17
|
-
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
18
|
-
|
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
20
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
21
|
-
spec.metadata["documentation_uri"] = spec.homepage
|
|
22
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
|
|
23
|
-
|
|
24
|
-
spec.files = [
|
|
25
|
-
".document",
|
|
26
|
-
"Gemfile",
|
|
27
|
-
"LICENSE.txt",
|
|
28
|
-
"README.md",
|
|
29
|
-
"Rakefile",
|
|
30
|
-
"bin/console",
|
|
31
|
-
"bin/setup",
|
|
32
|
-
"doc/irb/irb-tools.rd.ja",
|
|
33
|
-
"doc/irb/irb.rd.ja",
|
|
34
|
-
"exe/irb",
|
|
35
|
-
"irb.gemspec",
|
|
36
|
-
"man/irb.1",
|
|
37
|
-
] + Dir.glob("lib/**/*")
|
|
38
|
-
spec.bindir = "exe"
|
|
39
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
40
|
-
spec.require_paths = ["lib"]
|
|
41
|
-
|
|
42
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.7")
|
|
43
|
-
|
|
44
|
-
spec.add_dependency "reline", ">= 0.4.2"
|
|
45
|
-
spec.add_dependency "rdoc", ">= 4.0.0"
|
|
46
|
-
end
|