1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib
aycabta 77700bf023
Backport lib/reline, and lib/irb for 3.0.1 2nd (#4157)
* [ruby/irb] Stub a screen size for tests

6663057083

* [ruby/irb] Support GitHub Actions

8e9e6c4037

* [ruby/irb] Stub a screen size for test_context

http://ci.rvm.jp/logfiles/brlog.trunk-random1.20210119-074232

ea87592d4a

* [ruby/irb] Use a real screen size for pp by default

9b9300dec2

* [ruby/irb] Rescue Errno::EINVAL on IRB pp

20210119T070008Z.log.html.gz
is caused by:

/export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline/ansi.rb:157:in `winsize': Invalid argument - <STDIN> (Errno::EINVAL)
        from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline/ansi.rb:157:in `get_screen_size'
        from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline.rb:168:in `get_screen_size'
        from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/forwardable.rb:238:in `get_screen_size'
        from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/irb/color_printer.rb:7:in `pp'
        from -e:1:in `<main>'

1719514598

* [ruby/irb] Split test files for IRB::Color and IRB::ColorPrinter

d95e8daab3

* [ruby/irb] Undefine unused constants

eea9c16804

* [ruby/irb] Remove pp-specific stub from TestColor

because it was for TestColorPrinter

7569206fd4

* [ruby/irb] Delete a doodle-level memo comment...

fc3e1d9e0c

* [ruby/irb] Indent correctly with keyword "for" and "in"

47c83ea724

* [ruby/irb] Indent correctly with method calling with receiver

e7c68e74a0

* [ruby/irb] add `IRB::FileInputMethod.open` to ensure closing associated File

* tweak some methods not to raise exception after `#close`
* use it in `IRB::IrbLoader#{source_file,load_file}

ec2947acbd

* [ruby/irb] use `RubyLex::TerminateLineInput` appropriately [Bug #17564]

* using the appropriciate exception instead of `break` so that the session
  can be continue after the `irb_source` and `irb_load` commands
* suppress extra new line due to one more `#prompt` call

bdefaa7cfd

* [ruby/irb] specify the `VERBOSE` to `false` and fix tests to fit

502c590925

* In test, need to pass a context to IRB::WorkSpace.new explicitly

* Fix absolute path predicate on Windows

A path starts with '/' is not an absolute path on Windows, because
of drive letter or UNC.

* [ruby/irb] follow up the actual line number

7aed8fe3b1

* [ruby/irb] Add info.rb to gemspec

adbba19adf

* [ruby/irb] Allow "measure" command to take block

20f1ca23e9

* [ruby/irb] Enable to reassign a new block with "measure" command

b444573aa2

* [ruby/reline] Cache pasting state in processing a key

Because it's too slow.

The rendering time in IRB has been reduced as follows:

  start = Time.now

  def each_top_level_statement
    initialize_input
    catch(:TERM_INPUT) do
      loop do
        begin
          prompt
          unless l = lex
            throw :TERM_INPUT if @line == ''
          else
            @line_no += l.count("\n")
            next if l == "\n"
            @line.concat l
            if @code_block_open or @ltype or @continue or @indent > 0
              next
            end
          end
          if @line != "\n"
            @line.force_encoding(@io.encoding)
            yield @line, @exp_line_no
          end
          break if @io.eof?
          @line = ''
          @exp_line_no = @line_no

          @indent = 0
        rescue TerminateLineInput
          initialize_input
          prompt
        end
      end
    end
  end

  puts "Duration: #{Time.now - start} seconds"

0.22sec -> 0.14sec

b8b3dd52c0

* [ruby/reline] Initialize uninitialized variables in tests

25af4bb64b

* [ruby/reline] Remove an unused variable

123ea51166

* [ruby/reline] Scroll down when ^C is pressed

6877a7e3f5

* [ruby/reline] Show all lines higher than the screen when finished

On Unix-like OSes, logs prior to the screen are not editable. When the code
is higher than the screen, the code is only shown on the screen until input
is finished, but when it is finished, all lines are outputted.

8cd9132a39

* [ruby/reline] Handle past logs correctly when the code is higher than the screen

f197139b4a

* [ruby/reline] Update cursor info by inserting newline even if not in pasting

92d314f514

* [ruby/reline] Move cursor just after the last line when finished

ba06e4c480

* [ruby/reline] The vi_histedit supports multiline

This closes ruby/reline#253.

f131f86d71

* [ruby/reline] Autowrap correctly when inserting chars in the middle of a line

ebaf37255f

* [ruby/reline] Terminate correctly in the middle of lines higher than the screen

e1d9240ada

* [ruby/irb] Version 1.3.3

4c87035b7c

* [ruby/reline] Version 0.2.3

b26c7d60c8

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Nobuhiro IMAI <nov@yo.rim.or.jp>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: ima1zumi <mariimaizumi5@gmail.com>
2021-02-07 21:04:32 +09:00
..
benchmark Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
bundler Merge Bundler-2.2.7 2021-02-02 21:30:08 +09:00
cgi Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
csv [ruby/csv] Add support for \r\n with skip_lines: /...$/ again 2020-11-24 09:33:55 +09:00
delegate Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
did_you_mean Sync did_you_mean 2020-12-22 14:42:32 +09:00
drb Separate send into public_send and __send__ 2020-10-27 16:12:45 +09:00
forwardable Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
getoptlong Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
irb Backport lib/reline, and lib/irb for 3.0.1 2nd (#4157) 2021-02-07 21:04:32 +09:00
logger Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
matrix [ruby/matrix] v0.3.1 2020-12-09 02:15:41 -05:00
net Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
observer Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
optparse Added the missing licenses field to some default gems 2020-08-18 20:26:39 +09:00
ostruct Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
pstore Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
racc [ruby/racc] Bump version to 1.5.1 2020-11-10 21:35:04 +09:00
rdoc [ruby/rdoc] Bump version to 6.3.0 2020-12-21 16:22:08 +09:00
reline Backport lib/reline, and lib/irb for 3.0.1 2nd (#4157) 2021-02-07 21:04:32 +09:00
rinda Added dependencies for rinda 2020-12-04 20:21:41 +09:00
rubygems Merge RubyGems-3.1.7 2021-02-02 21:30:08 +09:00
set Import set 1.0.1 2020-12-22 21:41:44 +09:00
singleton Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
timeout Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
tracer Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
unicode_normalize
uri Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
weakref Added dependencies for weakref 2020-12-01 19:48:24 +09:00
yaml Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
.document Remove unnecessary files from .document 2020-12-20 16:00:13 +09:00
abbrev.gemspec Promote abbrev to default gems 2020-09-10 18:56:16 +09:00
abbrev.rb
base64.gemspec Promote base64 to default gems 2020-09-10 18:56:17 +09:00
base64.rb
benchmark.rb
bundler.rb Merge Bundler-2.2.5 2021-01-14 16:44:42 +09:00
cgi.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
csv.rb [ruby/csv] Clarify and correct RDoc for converters (#178) 2020-11-24 09:33:55 +09:00
debug.gemspec Promote debug.rb to default gems. 2020-10-30 21:45:23 +09:00
debug.rb [Feature #16513] TracePoint#inspect returns "... file:line" (#3391) 2020-08-06 11:56:24 +09:00
delegate.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
did_you_mean.rb Sync did_you_mean 2020-06-06 13:02:08 -04:00
drb.rb
English.gemspec Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
English.rb
erb.gemspec Added dependencies for erb 2020-12-02 09:12:25 +09:00
erb.rb
fileutils.gemspec Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
fileutils.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
find.gemspec Promote find to default gems 2020-08-20 21:00:53 +09:00
find.rb
forwardable.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
getoptlong.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
ipaddr.gemspec [ruby/ipaddr] fixup 90b46678a5b09ed32612b0629b7c51c6d39a0444 2020-12-03 17:48:32 +09:00
ipaddr.rb
irb.rb Backport lib/reline, and lib/irb for 3.0.1 2nd (#4157) 2021-02-07 21:04:32 +09:00
logger.rb [ruby/logger] Mention File::Null in Logger#new document 2020-06-11 14:22:32 +09:00
matrix.rb [ruby/matrix] Make frozen matrices Ractor shareable 2020-12-09 02:15:41 -05:00
mkmf.rb Separate send into public_send and __send__ 2020-10-27 16:12:45 +09:00
mutex_m.gemspec Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
mutex_m.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
observer.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
open-uri.gemspec Added dependencies for open-uri 2020-12-01 19:48:24 +09:00
open-uri.rb Remove the deprecated override of Kernel#open in open-uri 2020-08-16 07:41:40 -07:00
open3.gemspec Manually picked 724bdb8e1d 2020-09-14 14:07:37 +09:00
open3.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
optionparser.rb
optparse.rb Separate send into public_send and __send__ 2020-10-27 16:12:45 +09:00
ostruct.rb [ruby/ostruct] Update version 2020-11-04 17:52:03 -05:00
pp.gemspec Added dependencies for pp 2020-12-02 09:12:25 +09:00
pp.rb [DOC] Add doc to sharing_detection= [ci skip] 2020-12-23 11:13:50 +09:00
prettyprint.gemspec Promote prettyprint to default gems 2020-10-08 16:40:46 +09:00
prettyprint.rb Fix articles. 2020-04-11 02:32:23 +09:00
prime.gemspec [ruby/prime] Fix gemspec 2020-12-09 01:30:06 -05:00
prime.rb [ruby/prime] v0.1.2 2020-12-09 00:45:56 -05:00
pstore.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
racc.rb
rdoc.rb Skip the initialization of XDG_DATA_HOME with Permission denied 2020-04-23 21:11:21 +09:00
readline.gemspec Fixed the invalid SPDX identifier on gemspec 2020-08-18 20:26:40 +09:00
readline.rb
reline.rb Backport lib/reline, and lib/irb for 3.0.1 2nd (#4157) 2021-02-07 21:04:32 +09:00
resolv-replace.gemspec Promote resolv-replace to default gems 2020-09-11 22:01:08 +09:00
resolv-replace.rb
resolv.gemspec Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
resolv.rb fe80 should be case insensitive too 2020-11-09 16:16:30 +09:00
rubygems.rb Merge RubyGems-3.1.7 2021-02-02 21:30:08 +09:00
securerandom.gemspec Promote securerandom to default gems 2020-09-11 21:15:25 +09:00
securerandom.rb Make SecureRandom support Ractor 2020-09-09 12:45:43 -07:00
set.rb Import set 1.0.1 2020-12-22 21:41:44 +09:00
shellwords.gemspec Promote shellwords to default gems 2020-09-10 18:56:17 +09:00
shellwords.rb Fix the ArgumentError message in shellsplit 2020-06-16 23:23:13 +09:00
singleton.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
tempfile.gemspec Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
tempfile.rb [ruby/tempfile] Improve the documentation for Tempfile.create and recommend Tempfile.open instead 2020-10-05 19:17:25 +02:00
time.gemspec Added dependencies for time 2020-12-01 19:48:24 +09:00
time.rb [DOC] Mentioned that Time.parse method is not validator 2020-06-21 16:16:15 +09:00
timeout.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
tmpdir.gemspec Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
tmpdir.rb [ruby/tmpdir] Warn when environment variables skipped (fixes #2) 2020-09-14 18:22:37 +09:00
tracer.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
tsort.gemspec Promote tsort to default gems 2020-09-09 21:53:09 +09:00
tsort.rb
un.gemspec Promote un.rb to the default gems. It's preparation for 3.0.0-preview2. 2020-11-05 20:21:31 +09:00
un.rb Use abort(message) instead of puts and exit 2020-12-10 21:06:10 +09:00
uri.rb [ruby/uri] Remove RCS keywords 2020-03-26 18:06:14 +09:00
weakref.rb Update library versions of the default gems. 2020-12-22 21:45:28 +09:00
yaml.rb Remove unnecessary word from comment 2020-07-28 12:14:45 +09:00