Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 2.7 backport about IRB #2990

Merged
merged 94 commits into from Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
fd1aead
Drop an invalid char as UTF-8
aycabta Dec 27, 2019
a5c3185
Add test_completion_with_indent_and_completer_quote_characters
aycabta Dec 27, 2019
f6e5906
text/readline/test_readline.rb - fix skip on Reline (#2743)
MSP-Greg Dec 31, 2019
4801e51
[ruby/reline] Degenerate the terminal size to [$LINES, $COLUMNS] if i…
mame Dec 29, 2019
11593b6
[ruby/irb] Add tests for RubyLex
BenKanouse Dec 27, 2019
67c6dec
Add "require 'openstruct'" what is forgotten
aycabta Dec 31, 2019
0abe854
[ruby/irb] Fix lib name of OpenStruct
aycabta Dec 31, 2019
6c35a1a
Add load path and require for ruby/ruby
aycabta Dec 31, 2019
67fccd4
[ruby/reline] Sort completion list
shuujii Dec 27, 2019
cd9a37a
Rescue EOFError
aycabta Jan 5, 2020
ada4f80
Complete indented and quoted string correctly
aycabta Jan 5, 2020
f13830d
Support history-size in .inputrc correctly
aycabta Jan 6, 2020
7c93866
[ruby/irb] Fix newline depth with multiple braces
BenKanouse Dec 30, 2019
3161ab2
[ruby/irb] Fix crashing when multiple open braces per line
BenKanouse Jan 5, 2020
4569fe2
Introduce an abstracted structure about the encoding of Reline
aycabta Jan 12, 2020
a86ccda
Remove an unused setting variable
aycabta Jan 13, 2020
9ffed38
Use Reline.encoding_system_needs if exists
aycabta Jan 14, 2020
79f7338
Add tests for vi_insert and vi_add
aycabta Jan 16, 2020
328b6ee
Implement vi_insert_at_bol and vi_add_at_eol
aycabta Jan 16, 2020
1825592
[ruby/reline] Implement vi_to_next_char
aycabta Jan 17, 2020
d4f6772
[ruby/reline] Implement vi_prev_char and vi_to_prev_char
aycabta Jan 17, 2020
eb67d1f
[ruby/irb] Fix compatibility with rails before 5.2
larskanis Jan 17, 2020
c004ba8
[ruby/irb] Add newline_before_multiline_output
mrkn Jan 16, 2020
058ea92
[ruby/irb] [ruby/irb] Rewrite an expression to detect multiline
mrkn Jan 20, 2020
c92158e
[ruby/reline] Implement vi_change_meta
aycabta Jan 21, 2020
15e7383
Reline: Use a more robust detection of MinTTY
larskanis Jan 18, 2020
50ac3c4
Reline: Fix changed test results due to change to UTF-8 on Windows
larskanis Jan 18, 2020
f9cf45d
[ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that asse…
nobu Jul 14, 2019
8575c04
Stop using minitest dependent methods
aycabta Dec 3, 2019
b2023e4
Skip a test that uses assert_ruby_status if it doesn't exist
aycabta Dec 3, 2019
a132755
Use omit instead of skip
aycabta Dec 3, 2019
e86d932
Check DONT_RUN_RELINE_TEST envvar
aycabta Dec 3, 2019
31f75ba
Always refer to Reline::IOGate.encoding
aycabta Jan 25, 2020
1725f23
Always use UTF-8 for Reline::GeneralIO on Windows
aycabta Jan 26, 2020
238b857
Use test_mode on Reline::History::Test for encoding
aycabta Jan 26, 2020
4f423a3
[ruby/reline] Support GNOME style Home/End key sequences [Bug #16510]
aycabta Jan 27, 2020
f8736cc
[ruby/irb] Exclude useless files from RDoc
nobu Feb 1, 2020
225e774
[ruby/irb] Add a new easter egg: dancing ruby
mame Jan 28, 2020
85f3b32
[ruby/irb] Exclude useless files from RDoc
nobu Feb 1, 2020
e08c38e
[ruby/reline] Fix Reline::Windows#scroll_down
aycabta Jan 30, 2020
d2e5418
[ruby/reline] Bypass cursor down when a char is rendered at eol on Wi…
aycabta Jan 31, 2020
76cf310
Fix inaccuracy in encoding tests
larskanis Jan 27, 2020
2868549
[ruby/reline] Organize special keys escape sequences
aycabta Feb 8, 2020
9ee306b
Revert "[ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so t…
aycabta Feb 9, 2020
7e87027
[ruby/readline-ext] Remove unnecessary -I$(top_srcdir) when it's an i…
aycabta Feb 9, 2020
42645b2
[ruby/readline-ext] Check TestRelineAsReadline existance
aycabta Feb 9, 2020
8eda9c0
[ruby/readline-ext] The ruby/assert.h is adopted by Ruby 2.7 or later
aycabta Feb 9, 2020
790a97e
[ruby/readline-ext] Use require check instead of DONT_RUN_RELINE_TEST…
aycabta Feb 9, 2020
c342695
[ruby/readline-ext] Add spec.extensions
aycabta Feb 9, 2020
80657b5
[ruby/readline-ext] Use rake/extensiokntask to build
aycabta Feb 9, 2020
c03f31f
Fix readline build dependency
XrXr Feb 9, 2020
507a4ba
[ruby/irb] Add test_complete_symbol
aycabta Feb 10, 2020
c92f8a2
[ruby/irb] Check doc namespace correctly
aycabta Feb 10, 2020
c8667cd
[ruby/irb] Fix auto indent with closed brace
aycabta Feb 10, 2020
fc57382
[ruby/irb] Use 0.step instead of (..0).each for Ruby 2.5
aycabta Feb 2, 2020
7aceafb
Revert "[ruby/irb] Add test_complete_symbol"
hsbt Feb 12, 2020
5d2a8e5
Add test_complete_symbol
aycabta Feb 12, 2020
5cba389
test/irb/test_completion.rb: suppress a warning: unused literal ignored
mame Feb 13, 2020
288b21c
[ruby/reline] Use IO#write instead of IO#print
aycabta Feb 14, 2020
3ca2689
[ruby/reline] Version 0.1.3
aycabta Feb 14, 2020
f9cf781
[ruby/irb] Version 1.2.2
aycabta Feb 14, 2020
045cee1
[ruby/irb] Include easter-egg.rb in gemspec
nicklewis Feb 14, 2020
ce81c14
[ruby/irb] fix reserved words and completion for them
no6v Feb 12, 2020
0f1e296
[ruby/irb] Version 1.2.3
aycabta Feb 15, 2020
dc06bbb
support multi-run test for test_readline.rb
S-H-GAMELINKS Feb 18, 2020
9bc17a3
[ruby/irb] `yield` outside method definition is a syntax error
nobu Feb 19, 2020
8c1c287
test/readline - allow ENV control of test class creation
MSP-Greg Feb 19, 2020
1612e62
Omit test_using_quoting_detection_proc_with_multibyte_input temporari…
aycabta Feb 28, 2020
3fc0223
support random order test.
ko1 Feb 28, 2020
7844ee8
Set Readline.completion_append_character = nil always
aycabta Feb 28, 2020
6c071d7
Fix a typo [ci skip]
znz Feb 29, 2020
1c81ed3
skip test if Reline.completion_proc is nil.
ko1 Mar 2, 2020
464d207
Reset Reline.point
ko1 Mar 2, 2020
6f4bc0b
Convert incompatible encoding symbol names
aycabta Mar 3, 2020
cd495e8
Ignore incompatible convert of symbols
ko1 Mar 3, 2020
0902e4a
Add workaround for test-bundler failure
znz Mar 12, 2020
4e8b9ee
[ruby/irb] Unnamed groups are not captured when named groups are used
nobu Jan 30, 2020
705364f
[ruby/irb] Detect multiple lines output simplify
aycabta Feb 25, 2020
b96b0df
[ruby/irb] Suppress crashing when EncodingError has occurred without …
aycabta Mar 26, 2020
4e4f2b6
[ruby/reline] Work with wrong $/ value correctly
aycabta Feb 23, 2020
c8c4c04
[ruby/reline] Suppress error in case INPUTRC env is empty
aycabta Mar 21, 2020
a0172cc
[ruby/reline] Add yamatanooroti rendering test
aycabta Mar 21, 2020
a192373
[ruby/reline] Rename test suite name of yamatanooroti test
aycabta Mar 21, 2020
ed71d65
[ruby/reline] Add a comment why rescue yamatanooroti loading error on…
aycabta Mar 21, 2020
72ec328
[ruby/reline] Suppress error when check ambiguous char width in LANG=C
aycabta Mar 24, 2020
0b8c0c5
[ruby/io-console] Enable only interrupt bits on `intr: true`
nobu Dec 29, 2019
8b14883
[ruby/io-console] bump up to 0.5.4
nobu Dec 30, 2019
567aa52
[ruby/io-console] Update the minimum requirement of Ruby version
hsbt Dec 23, 2019
9a18cc5
[ruby/io-console] Filter Ruby engine name rather than just /ruby/
headius Jan 13, 2020
3c0bb78
[ruby/io-console] bump up to 0.5.5
nobu Jan 17, 2020
d6b630a
[ruby/io-console] Prefer keyword arguments
nobu Feb 14, 2020
ec67750
[ruby/io-console] [DOC] Improved about `intr:`
nobu Feb 17, 2020
dff20db
[ruby/io-console] Just ignore the extension on other than CRuby
nobu Feb 17, 2020
dda8a39
[ruby/io-console] bump up to 0.5.6
nobu Feb 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 15 additions & 8 deletions ext/io/console/console.c
Expand Up @@ -111,6 +111,9 @@ rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *
int argc = *argcp;
rawmode_arg_t *optp = NULL;
VALUE vopts = Qnil;
#ifdef RB_SCAN_ARGS_PASS_CALLED_KEYWORDS
argc = rb_scan_args(argc, argv, "*:", NULL, &vopts);
#else
if (argc > min_argc) {
vopts = rb_check_hash_type(argv[argc-1]);
if (!NIL_P(vopts)) {
Expand All @@ -120,6 +123,7 @@ rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *
if (!vopts) vopts = Qnil;
}
}
#endif
rb_check_arity(argc, min_argc, max_argc);
if (!NIL_P(vopts)) {
VALUE vmin = rb_hash_aref(vopts, ID2SYM(id_min));
Expand Down Expand Up @@ -188,7 +192,7 @@ set_rawmode(conmode *t, void *arg)
#endif
#ifdef ISIG
if (r->intr) {
t->c_iflag |= BRKINT|IXON;
t->c_iflag |= BRKINT;
t->c_lflag |= ISIG;
t->c_oflag |= OPOST;
}
Expand Down Expand Up @@ -356,9 +360,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter

/*
* call-seq:
* io.raw(min: nil, time: nil) {|io| }
* io.raw(min: nil, time: nil, intr: nil) {|io| }
*
* Yields +self+ within raw mode.
* Yields +self+ within raw mode, and returns the result of the block.
*
* STDIN.raw(&:gets)
*
Expand All @@ -370,6 +374,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
* The parameter +time+ specifies the timeout in _seconds_ with a
* precision of 1/10 of a second. (default: 0)
*
* If the parameter +intr+ is +true+, enables break, interrupt, quit,
* and suspend special characters.
*
* Refer to the manual page of termios for further details.
*
* You must require 'io/console' to use this method.
Expand All @@ -383,11 +390,11 @@ console_raw(int argc, VALUE *argv, VALUE io)

/*
* call-seq:
* io.raw!(min: nil, time: nil)
* io.raw!(min: nil, time: nil, intr: nil) -> io
*
* Enables raw mode.
* Enables raw mode, and returns +io+.
*
* If the terminal mode needs to be back, use io.raw { ... }.
* If the terminal mode needs to be back, use <code>io.raw { ... }</code>.
*
* See IO#raw for details on the parameters.
*
Expand Down Expand Up @@ -483,7 +490,7 @@ nogvl_getch(void *p)

/*
* call-seq:
* io.getch(min: nil, time: nil) -> char
* io.getch(min: nil, time: nil, intr: nil) -> char
*
* Reads and returns a character in raw mode.
*
Expand Down Expand Up @@ -1490,7 +1497,7 @@ console_dev(int argc, VALUE *argv, VALUE klass)

/*
* call-seq:
* io.getch(min: nil, time: nil) -> char
* io.getch(min: nil, time: nil, intr: nil) -> char
*
* See IO#getch.
*/
Expand Down
9 changes: 6 additions & 3 deletions ext/io/console/extconf.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
require 'mkmf'

ok = true
ok = true if RUBY_ENGINE == "ruby"
hdr = nil
case
when macro_defined?("_WIN32", "")
Expand All @@ -14,8 +14,9 @@
%w"stty gtty".each {|f| have_func(f, hdr)}
else
ok = false
end
if ok
end if ok
case ok
when true
have_header("sys/ioctl.h") if hdr
# rb_check_hash_type: 1.9.3
# rb_io_get_write_io: 1.9.1
Expand All @@ -27,4 +28,6 @@
create_makefile("io/console") {|conf|
conf << "\n""VK_HEADER = #{vk_header}\n"
}
when nil
File.write("Makefile", dummy_makefile($srcdir).join(""))
end
4 changes: 2 additions & 2 deletions ext/io/console/io-console.gemspec
@@ -1,5 +1,5 @@
# -*- ruby -*-
_VERSION = "0.5.3"
_VERSION = "0.5.6"
date = %w$Date:: $[1]

Gem::Specification.new do |s|
Expand All @@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.summary = "Console interface"
s.email = "nobu@ruby-lang.org"
s.description = "add console capabilities to IO instances."
s.required_ruby_version = ">= 2.2.0"
s.required_ruby_version = ">= 2.4.0"
s.homepage = "https://github.com/ruby/io-console"
s.metadata["source_code_url"] = s.homepage
s.authors = ["Nobu Nakada"]
Expand Down
1 change: 0 additions & 1 deletion ext/readline/extconf.rb
Expand Up @@ -109,5 +109,4 @@ def readline.have_type(type)
$defs << "-Drl_hook_func_t=Function"
end

$INCFLAGS << " -I$(top_srcdir)"
create_makefile("readline")
7 changes: 6 additions & 1 deletion ext/readline/readline-ext.gemspec
Expand Up @@ -8,14 +8,19 @@ Gem::Specification.new do |spec|
spec.description = %q{Provides an interface for GNU Readline and Edit Line (libedit).}
spec.homepage = "https://github.com/ruby/readline-ext"
spec.license = "BSD-2-Clause"
spec.extensions = %w[ext/readline/extconf.rb]

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage

spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rake-compiler"
end
2 changes: 1 addition & 1 deletion lib/benchmark/benchmark.gemspec
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down
2 changes: 1 addition & 1 deletion lib/cgi/cgi.gemspec
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.metadata["source_code_uri"] = spec.homepage

spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down
2 changes: 1 addition & 1 deletion lib/delegate/delegate.gemspec
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.metadata["source_code_uri"] = spec.homepage

spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down
2 changes: 1 addition & 1 deletion lib/getoptlong/getoptlong.gemspec
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down
12 changes: 10 additions & 2 deletions lib/irb.rb
Expand Up @@ -21,6 +21,7 @@
require "irb/color"

require "irb/version"
require "irb/easter-egg"

# IRB stands for "interactive Ruby" and is a tool to interactively execute Ruby
# expressions read from the standard input.
Expand Down Expand Up @@ -553,7 +554,8 @@ def eval_input

def handle_exception(exc)
if exc.backtrace && exc.backtrace[0] =~ /\/irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
!(SyntaxError === exc)
!(SyntaxError === exc) && !(EncodingError === exc)
# The backtrace of invalid encoding hash (ex. {"\xAE": 1}) raises EncodingError without lineno.
irb_bug = true
else
irb_bug = false
Expand Down Expand Up @@ -736,7 +738,13 @@ def prompt(prompt, ltype, indent, line_no) # :nodoc:
end

def output_value # :nodoc:
printf @context.return_format, @context.inspect_last_value
str = @context.inspect_last_value
multiline_p = str.include?("\n")
if multiline_p && @context.newline_before_multiline_output?
printf @context.return_format, "\n#{str}"
else
printf @context.return_format, str
end
end

# Outputs the local variables to this current session, including
Expand Down
1 change: 1 addition & 0 deletions lib/irb/.document
@@ -0,0 +1 @@
**/*.rb
27 changes: 14 additions & 13 deletions lib/irb/completion.rb
Expand Up @@ -17,11 +17,12 @@ module InputCompletor # :nodoc:
# Set of reserved words used by Ruby, you should not use these for
# constants or variables
ReservedWords = %w[
__ENCODING__ __LINE__ __FILE__
BEGIN END
alias and
begin break
case class
def defined do
def defined? do
else elsif end ensure
false for
if in
Expand Down Expand Up @@ -98,7 +99,11 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
return nil if doc_namespace
if Symbol.respond_to?(:all_symbols)
sym = $1
candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name}
candidates = Symbol.all_symbols.collect do |s|
":" + s.id2name.encode(Encoding.default_external)
rescue Encoding::UndefinedConversionError
# ignore
end
candidates.grep(/^#{Regexp.quote(sym)}/)
else
[]
Expand Down Expand Up @@ -143,7 +148,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
select_message(receiver, message, candidates, sep)
end

when /^(?<num>-?(0[dbo])?[0-9_]+(\.[0-9_]+)?(([eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
when /^(?<num>-?(?:0[dbo])?[0-9_]+(?:\.[0-9_]+)?(?:(?:[eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
# Numeric
receiver = $~[:num]
sep = $~[:sep]
Expand Down Expand Up @@ -203,7 +208,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
sep = $2
message = Regexp.quote($3)

gv = eval("global_variables", bind).collect{|m| m.to_s}.append("true", "false", "nil")
gv = eval("global_variables", bind).collect{|m| m.to_s}.push("true", "false", "nil")
lv = eval("local_variables", bind).collect{|m| m.to_s}
iv = eval("instance_variables", bind).collect{|m| m.to_s}
cv = eval("self.class.constants", bind).collect{|m| m.to_s}
Expand Down Expand Up @@ -255,7 +260,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace

else
candidates = eval("methods | private_methods | local_variables | instance_variables | self.class.constants", bind).collect{|m| m.to_s}
conditions |= ReservedWords
candidates |= ReservedWords

if doc_namespace
candidates.find{ |i| i == input }
Expand All @@ -265,18 +270,14 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
end
end

PerfectMatchedProc = ->(matched) {
PerfectMatchedProc = ->(matched, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding) {
RDocRIDriver ||= RDoc::RI::Driver.new
if matched =~ /\A(?:::)?RubyVM/ and not ENV['RUBY_YES_I_AM_NOT_A_NORMAL_USER']
File.open(File.join(__dir__, 'ruby_logo.aa')) do |f|
RDocRIDriver.page do |io|
IO.copy_stream(f, io)
end
end
IRB.send(:easter_egg)
return
end
namespace = retrieve_completion_data(matched, doc_namespace: true)
return unless matched
namespace = retrieve_completion_data(matched, bind: bind, doc_namespace: true)
return unless namespace
if namespace.is_a?(Array)
out = RDoc::Markup::Document.new
namespace.each do |m|
Expand Down
20 changes: 20 additions & 0 deletions lib/irb/context.rb
Expand Up @@ -133,6 +133,11 @@ def initialize(irb, workspace = nil, input_method = nil)
if @echo_on_assignment.nil?
@echo_on_assignment = false
end

@newline_before_multiline_output = IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT]
if @newline_before_multiline_output.nil?
@newline_before_multiline_output = true
end
end

# The top-level workspace, see WorkSpace#main
Expand Down Expand Up @@ -253,6 +258,20 @@ def main
# a = "omg"
# #=> omg
attr_accessor :echo_on_assignment
# Whether a newline is put before multiline output.
#
# Uses IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT] if available,
# or defaults to +true+.
#
# "abc\ndef"
# #=>
# abc
# def
# IRB.CurrentContext.newline_before_multiline_output = false
# "abc\ndef"
# #=> abc
# def
attr_accessor :newline_before_multiline_output
# Whether verbose messages are displayed or not.
#
# A copy of the default <code>IRB.conf[:VERBOSE]</code>
Expand Down Expand Up @@ -287,6 +306,7 @@ def main
alias ignore_eof? ignore_eof
alias echo? echo
alias echo_on_assignment? echo_on_assignment
alias newline_before_multiline_output? newline_before_multiline_output

# Returns whether messages are displayed or not.
def verbose?
Expand Down