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
aycabta
eae953ba9f
Rerender following lines when line number increased
2019-05-30 14:19:58 +09:00
aycabta
1cf9f79342
Clear remaining lines when line number decreased
2019-05-30 14:04:28 +09:00
aycabta
cb520e7623
Fix the auto-wrap behabior that was too buggy
2019-05-30 12:29:38 +09:00
Nobuyoshi Nakada
5b64d7ac6e
Colorize errors more
...
* lib/irb/color.rb (IRB::Color.colorize_code): colorize
`compile_error` part as same as `on_parse_error`.
2019-05-29 22:09:54 +09:00
Nobuyoshi Nakada
12644e8b02
Get rid of nested string interpolations
...
* lib/irb/color.rb (IRB::Color.colorize): get rid of nesting string
interpolations not to confuse ruby-mode.el
2019-05-29 21:59:34 +09:00
aycabta
83e905eb4e
Revert "Use "require" just for essential"
...
This reverts commit ab7a6e1a16
.
2019-05-29 20:24:00 +09:00
aycabta
ab7a6e1a16
Use "require" just for essential
...
The 559dca509d
contains an excess range in
using "require".
2019-05-29 20:21:00 +09:00
aycabta
fafcbe0eb0
Use reversed get_screen_size correctly on Windows
2019-05-29 18:52:34 +09:00
Nobuyoshi Nakada
5ceff480c2
ripper: Ripper::Lexer#scan
...
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer#scan): parses the
code and returns the result elements including errors.
[EXPERIMENTAL]
2019-05-29 18:21:28 +09:00
Nobuyoshi Nakada
068d327595
Colorize compile_error as same as on_parse_error
2019-05-29 13:34:19 +09:00
Nobuyoshi Nakada
cc66272e50
parse.y: flush invalid char
2019-05-29 13:24:24 +09:00
Koichi Sasada
8187ffa461
Revert "Colorize error part more"
...
This reverts commit c7f3c222c9
.
2019-05-29 04:30:36 +01:00
Nobuyoshi Nakada
c7f3c222c9
Colorize error part more
...
Colorize `compile_error` parts as well as `on_parse_error` parts.
2019-05-29 12:12:19 +09:00
aycabta
3f13297923
Remove extra items because Reline::HISTORY is a sized queue
2019-05-29 10:04:58 +09:00
Takashi Kokubun
98ba116d40
Revert 3b7862c8e8
causing various CI hangs
...
and dependent commits c67934b1c3
and
f0d1dc5cee
.
RubyCI and ci.rvm.jp are almost dead by timeout since this commit.
---
Revert "Skip a reline test hanging on Wercker since 3b7862c8e8
"
This reverts commit f0d1dc5cee
.
Revert "Remove extra items because Reline::HISTORY is a sized queue"
This reverts commit c67934b1c3
.
Revert "Use existing instances for LineEditor and Config"
This reverts commit 3b7862c8e8
.
2019-05-29 09:05:26 +09:00
aycabta
8d83743170
Use IO.copy_stream
2019-05-29 06:57:47 +09:00
aycabta
a4a682c450
Check RUBY_YES_I_AM_NOT_A_NORMAL_USER env to access RubyVM doc
2019-05-29 06:57:47 +09:00
aycabta
d341bb2857
IRB never show RubyVM's doc
2019-05-29 06:57:47 +09:00
aycabta
d390af3686
Encode completed strings corecctly
2019-05-29 06:54:57 +09:00
aycabta
c67934b1c3
Remove extra items because Reline::HISTORY is a sized queue
2019-05-29 05:58:33 +09:00