Jeremy Evans
a06301b103
Ignore history file without saving if permissions cannot be changed
...
Fixes [Ruby Bug 13907]
2019-07-27 16:56:04 +09:00
Charles Oliver Nutter
f9f02e8216
Use JRuby equivalent of RubyVM.compile.
...
RubyVM is specific to CRuby and not supported on JRuby. This is
the equivalent operation.
2019-07-27 16:56:04 +09:00
aycabta
de18328192
Some keywords, "true", "false", and "nil" should be treated as a variable
2019-07-20 02:53:47 +09:00
aycabta
c8ee44f44c
Fix showing doc of "nil.to_s", nil doesn't have #name
2019-07-19 08:23:41 +09:00
aycabta
c20445ab56
Require Ruby 2.4 or later because needs lex_state from Ripper
2019-07-15 17:22:18 +09:00
Kazuhiro NISHIYAMA
b789648830
Change PROMPT_S of simple-prompt
...
When input `"` or `/` with simple-prompt,
Before:
`"` or `/`
(prompt disappeared and indent is changed)
After:
`"> "` or `/> /`
(indent is unchanged since `>> `)
2019-07-15 10:29:48 +09:00
aycabta
0af897ab59
Simplify history saving code
2019-07-15 10:20:23 +09:00
aycabta
17ccda5413
Use #to_a for Readline::HISTORY directly
2019-07-15 08:33:07 +09:00
aycabta
2b78a93bcf
Add lib/irb/color.rb to destribution file list
2019-07-15 07:59:33 +09:00
aycabta
266f6cd8a1
Remove debug print
2019-07-15 07:54:47 +09:00
aycabta
4b7a04a5b8
Support multiline irb_history
...
A history line ends with "\" to escape newline if it's a continuous
line.
2019-07-15 07:51:57 +09:00
aycabta
078e50c5e9
Save history in IRB is enabled by default
2019-07-15 01:16:18 +09:00
aycabta
6d57369105
Auto indent in IRB is enabled by default
2019-07-15 01:07:37 +09:00
aycabta
82b058ff60
Version 1.1.0.pre.2
2019-07-15 00:43:47 +09:00
aycabta
d0b1a8d5fb
Need reline-0.0.1 or later for some features
2019-07-15 00:43:36 +09:00
Masataka Pocke Kuwabara
9806da50f4
Suppress warnings
2019-07-15 00:13:01 +09:00
aycabta
89e178c7cb
Fix showing document of ClassName.method_name in IRB
...
In IRB, Time.new is split as "Time", ".", and "new". The receiver "Time"
is processed by #class method but it means that "Time" changes to
"Class". This commit fixes it.
2019-07-06 07:19:37 +09:00
aycabta
7b9bb6f44a
Check code_block_open for whether code continues
2019-07-03 23:37:46 +09:00
aycabta
776759e300
Keyword token that follows EXPR_FNAME must be a method name
2019-07-02 03:34:15 +09:00
aycabta
c718f56ed9
Remove auto indent of continuation line
2019-06-28 22:25:35 +09:00
Nobuyoshi Nakada
951f80f2dd
Removed unused variable
2019-06-28 14:09:26 +09:00
aycabta
2fd03fd7e6
EXPR_LABEL also indicates non-continuation line
...
Example:
[
1, # this is not continuation line
2
]
2019-06-27 16:03:43 +09:00
Kazuhiro NISHIYAMA
c86a9e6592
bc mode is already removed [ci skip]
2019-06-27 11:18:02 +09:00
aycabta
d6bcf36793
EXPR_CMDARG also indicates the end of an expression
2019-06-27 10:59:26 +09:00
aycabta
24c4e6dec1
Increase indent of continuation line
...
v =
3 # auto indent
2019-06-27 01:26:14 +09:00
aycabta
ba17127e99
Decrease nesting level when closing token comes at a non-first token of line
2019-06-26 18:44:27 +09:00
Nobuyoshi Nakada
fe0ddf0e58
ensure
is not a continuos line
2019-06-26 15:01:01 +09:00
Nobuyoshi Nakada
a3d1cacda6
Decrease indent at "elsif" too
2019-06-26 10:49:23 +09:00
Nobuyoshi Nakada
ea8bc6822d
Remove other debug prints
2019-06-26 10:49:23 +09:00
aycabta
cfa1a18431
Remove debug print...sorry
2019-06-26 08:07:58 +09:00
aycabta
57e1a69ea3
Treat auto indent with newline correctly
2019-06-25 22:07:32 +09:00
aycabta
0b57f9b25d
Decrease indent when "else", "rescue", "ensure", "when", or "in" come
2019-06-25 22:02:31 +09:00
aycabta
9c19cd5222
Refactor calculation of corresponding token depth
2019-06-25 00:18:55 +09:00
aycabta
c79131df28
Treat closing token with starting token at head of 2nd line correctly
...
v =
if true # starting token at head of 2nd line
3
end # closing token
2019-06-22 00:31:42 +09:00
aycabta
5e2088665b
Do auto indent only when closing token at first of line
...
if true
3; end # this isn't auto-indented
2019-06-22 00:31:42 +09:00
aycabta
50841eca43
Support irregular auto indent
...
v =
if true
3
end # this "end" is auto-indented correctly
2019-06-21 21:35:25 +09:00
aycabta
d009e321a0
Use IRB.conf[:AUTO_INDENT] setting in multiline mode
2019-06-19 09:19:41 +09:00
aycabta
84903b31c8
Fix auto indent crash when blank input
2019-06-18 21:58:05 +09:00
aycabta
235e72f17e
Implement auto indent for multiline
2019-06-18 20:58:18 +09:00
aycabta
2fb1564c02
Implement line_no correctly
2019-06-16 14:46:28 +09:00
aycabta
f80771f0a9
Use Reline.prompt_proc in IRB
2019-06-14 08:26:06 +09:00
Takashi Kokubun
1808029061
make sync-default-gems GEM=irb
...
Upgrade IRB to 41ea43a4a7
Mostly backport changes.
2019-06-13 00:32:20 +09:00
Nobuyoshi Nakada
9593e76ac2
Ripper::Lexer: fallback parse error token to the previous one
2019-06-12 15:25:06 +09:00
aycabta
8354cfd03b
Treat "begin rescue end" correctly
2019-06-12 11:00:25 +09:00
Nobuyoshi Nakada
880204cf55
irb/cmd/help.rb: return nil after the redefinition
2019-06-10 21:45:46 +09:00
Nobuyoshi Nakada
976c689ad4
irb: defer requiring rdoc to improve the start up time
2019-06-10 21:18:56 +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
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
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