Kazuhiro NISHIYAMA
fcc36d767b
Revert "Stop `circular require` warning"
...
This reverts commit c2a9c35024
.
It cannot stop `circular require` warning.
2019-06-06 16:49:40 +09:00
Kazuhiro NISHIYAMA
c2a9c35024
Stop `circular require` warning
2019-06-06 15:41:55 +09:00
Yusuke Endoh
861b50d81d
lib/rubygems.rb: Stop "Leaked file descriptor" warning
...
Bundler.setup changes Gem::DefaultUserInteraction.ui and does not close
it. This change makes sure that it is closed.
2019-06-06 15:25:18 +09:00
aycabta
02880d1f4a
Skip transpose-words if less than 2 word
2019-06-06 04:57:52 +09:00
aycabta
c75a3356b3
Move I/O access from Reline::KeyStroke to Reline
2019-06-05 11:29:59 +09:00
Jeremy Evans
96d6527424
Add some documentation to Timeout#timeout about possible issues
...
Documentation requested in [Bug #15886 ].
2019-06-04 19:19:37 -07:00
aycabta
9a07915ae2
Add aliases for commands for changing text macro
2019-06-04 08:35:01 +09:00
aycabta
4b7213a85a
Implement transpose-words
2019-06-04 07:23:36 +09:00
Takashi Kokubun
9987f45765
Reflect behavior changes to argument name
...
0c459af7c2
changed the meaning of
`detect_compile_error`, and this commit lets it follow the change.
2019-06-04 00:36:51 +09:00
Nobuyoshi Nakada
fc7b4c7018
Simplify matching
2019-06-04 00:33:56 +09:00
Takashi Kokubun
de541fe196
colorize_code must return escaped text
...
This was needed before 0c459af7c2
but it
could be actually useless now. But I added this anyway just in case.
2019-06-04 00:26:02 +09:00
Nobuyoshi Nakada
0c459af7c2
Colorize error characters
...
* lib/irb/color.rb (IRB::Color.scan): ignore "incomplete end of
input" error only, to colorize invalid characters, e.g., control
characters, and invalid symbols, as errors.
2019-06-04 00:14:55 +09:00
aycabta
d7c3eb570b
Erase VI_OPERATORS
...
The operators are using @waiting_operator_proc in vi mode.
2019-06-03 17:24:49 +09:00
aycabta
182072b211
The C-q is also quoted insert in emacs mode
2019-06-03 04:17:52 +09:00
aycabta
5524de5ca0
Add aliases for commands for moving macro
2019-06-03 03:41:40 +09:00
aycabta
3428922437
The ed_move_to_beg is different from vi_first_print
2019-06-03 03:29:34 +09:00
Nobuyoshi Nakada
65fdb90325
Reline::LineEditor::ARGUMENTABLE is no longer used
2019-06-03 02:03:15 +09:00
Nobuyoshi Nakada
3457ce4486
Fix ArgumentError in aliased macro
...
Closes: https://github.com/ruby/ruby/pull/2221
2019-06-03 01:35:48 +09:00
Nobuyoshi Nakada
f4b060d8d7
Check conditional nestings in INPUTRC
...
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Nobuyoshi Nakada
a1e6e45341
Prefer $INPUTRC over the default in the home
...
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Nobuyoshi Nakada
d04ebc57f2
Add true condition `Reline`
2019-06-02 20:31:25 +09:00
aycabta
486a2c26d6
Add Reline test for unknown macro
2019-06-02 08:50:01 +09:00
aycabta
e360688c4d
Add new test for Reline within pipe
2019-06-02 07:39:12 +09:00
aycabta
28e01f006d
Add comments to key bindings vars of Reline::Config
2019-06-02 07:28:26 +09:00
aycabta
bfd26cc18d
Reline.readmultiline always needs block to confirm termination
2019-06-02 07:21:59 +09:00
aycabta
7b1c1b9492
Suppress error of macro not found
2019-06-02 05:07:13 +09:00
Nobuyoshi Nakada
8a041c1b92
delegate.rb: markup method names
2019-06-02 00:34:02 +09:00
Hiroshi SHIBATA
56660de3c6
Merge rubygems master from upstream.
...
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
2019-06-01 13:50:41 +03:00
aycabta
34727475d0
Remove an unnecessary argument
2019-06-01 15:07:52 +09:00
Nobuyoshi Nakada
3034d666e8
Just use `File.readlines`
2019-06-01 14:57:36 +09:00
aycabta
7df65ef676
Use inputrc data for keystroke setting
2019-06-01 09:06:27 +09:00
Nobuyoshi Nakada
552c42f51f
Seprate raw keystroke config for each platforms
2019-06-01 00:41:17 +09:00
aycabta
88770c2ab6
Support Home and End key to move to beg and end
2019-06-01 00:02:35 +09:00
aycabta
21a43489b1
Use IO#sync= instead of a monkey patch
2019-05-31 22:53:01 +09:00
aycabta
73890d9d79
Flush I/O immediately if RELINE_STDERR_TTY is set
2019-05-31 22:33:08 +09:00
Hiroshi SHIBATA
913661cca0
Bump irb version to 1.1.0.pre.1.
...
Becausee the current irb support reline and have many of changes.
2019-05-31 16:15:43 +03:00
Jeremy Evans
e8c710b11a
Fix visibility of some methods when using DelegateClass
...
Public instance methods added to a delegated class after the
creation of the delegate class were not returned by the
public_instance_methods class method of the delegate class.
Protected instance methods in the delegated class when the
delegate class is created were returned by the public_methods
instance method of the delegate class.
Patch mostly from Kenichi Kamiya <kachick1@gmail.com> in
GitHub pull request 926. Minor changes to get it to apply,
and to fix tests after applying by me.
Fixes [Bug #11512 ]
2019-05-30 18:34:45 -07:00
Jeremy Evans
1cd93f1cdf
Allow DelegateClass() to module_eval given block
...
Methods that return classes often module_eval the given block
(e.g. Class.new and Struct.new). This allows DelegateClass to
work similarly. This makes it easier to use DelegateClass
directly without subclassing, so as not to create an unnecessary
subclass.
Implements [Feature #15842 ]
2019-05-30 18:34:45 -07:00
Takashi Kokubun
856593cc49
Fix typo 🐛 [ci skip]
2019-05-31 09:44:14 +09:00
Takashi Kokubun
cb40a21da0
Warn compile_error only when input is finished
...
Let's say we are in progress to write `"foo"`:
```
irb> "fo
```
at this moment, nothing is wrong.
It would be just a normal way to write `"foo"`.
Prior to this commit, the `fo` part was warned because of
5b64d7ac6e
. But I think warning such a
normal input is not valuable for users.
However, we'd like to warn `:@1` or `@@1` which is also a syntax error.
Then this commit switches the syntax highlight based on whether the
input text is finished or not. When it's not finished yet, it does not
warn compile_error.
2019-05-31 06:54:00 +09:00
Takashi Kokubun
6e052817f9
Abstract away Ripper::Lexer#scan in IRB::Color#scan
...
because 5b64d7ac6e
made it hard to
understand #colorize_code for me and this change is needed for my next
commit.
2019-05-31 06:21:17 +09:00
aycabta
8f83fe3b02
Finish with ^D only when input is completely empty in vi insert mode
2019-05-31 05:53:02 +09:00
aycabta
279c8e14d4
Use rebuilt buffer data to rerender all
2019-05-30 20:54:28 +09:00
aycabta
74a0e3ec23
Use start_with? for escaped quote too
2019-05-30 20:06:59 +09:00
aycabta
ecd0f1d966
Use negative lookahead and start_with?
2019-05-30 18:29:26 +09:00
aycabta
fcca39fa73
Fix strange vertical cursor moving when adding a newline at bottom
2019-05-30 18:21:09 +09:00
Takashi Kokubun
70e87d9660
Do not rely on IRB.conf[:MAIN_CONTEXT] before initialize
...
so that we can colorize binding.irb source lines.
2019-05-30 15:50:21 +09:00
aycabta
55c34b994b
Check the end token of heredoc correctly
2019-05-30 15:34:41 +09:00
aycabta
5a229b0a88
Calculate vertical position correctly when rerendering all lines
2019-05-30 15:19:30 +09:00
aycabta
90014dddec
Fix broken rendering when the last line is auto-wrapped
2019-05-30 15:04:37 +09:00