Stan Lo
35ff04ce5e
[ruby/irb] Bump version to v1.14.3
...
(https://github.com/ruby/irb/pull/1050 )
https://github.com/ruby/irb/commit/49050f9bf3
2024-12-19 08:45:31 +09:00
Stan Lo
cf711863cb
Exclude irb from documentation generation
...
- IRB has its own documentation in the project readme and https://ruby.github.io/irb/ already.
- As a tool, its internal implementation details are not relevant to the user.
- Excluding it from the documentation generation reduces the size of the generated documentation
and makes search results more relevant.
I also checked the there are no references to IRB so it should not break any links.
2024-12-16 11:55:33 -08:00
Stan Lo
562b9fc525
[ruby/irb] Avoid generating documentation pages for internal
...
components
(https://github.com/ruby/irb/pull/1047 )
https://github.com/ruby/irb/commit/f57025a35e
2024-12-13 17:08:34 +00:00
James Reid-Smith and Stan Lo
c0caf1cc1a
[ruby/irb] Load history when starting a direct debug session
...
(https://github.com/ruby/irb/pull/1046 )
* Load history when starting a direct debug session
When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and
`require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures
history is loaded in this case by calling `load_history` when configuring IRB
for the debugger.
Fixes ruby/irb#975
* Update test/irb/test_history.rb
* Update lib/irb/debug.rb
---------
https://github.com/ruby/irb/commit/7f851b5353
Co-authored-by: Stan Lo <stan001212@gmail.com >
2024-12-12 17:26:06 +00:00
Stan Lo
911879e01f
[ruby/irb] Bump version to v1.14.2
...
(https://github.com/ruby/irb/pull/1045 )
https://github.com/ruby/irb/commit/dd31884657
2024-12-12 13:14:56 +00:00
Stan Lo
2335ecb7fa
[ruby/irb] Page the output in irb:rdbg sessions too
...
(https://github.com/ruby/irb/pull/1043 )
IRB started to page its evaluation output and it became a useful feature
for users. However, in `irb:rdbg` sessions, the output is not paged so
the sudden change in behavior is surprising and inconvenient.
This commit makes `irb:rdbg` sessions page the output of the debugger
too.
https://github.com/ruby/irb/commit/8241ec9a0c
2024-12-11 11:30:36 +00:00
tomoya ishida
e539342f65
[ruby/irb] Don't show 'Maybe IRB bug!' in show_source and ls command
...
(https://github.com/ruby/irb/pull/1039 )
https://github.com/ruby/irb/commit/9eb14a3a0b
2024-12-03 21:55:33 +00:00
Mari Imaizumi
569f27b425
[ruby/irb] Prevent cursor flickering
...
(https://github.com/ruby/irb/pull/1041 )
https://github.com/ruby/irb/commit/0506ed0e11
2024-11-30 16:22:05 +00:00
tomoya ishida
def684508c
[ruby/irb] Fix indentation of xstring literal
...
(https://github.com/ruby/irb/pull/1038 )
Fixes indent calculation of this input
```
if false
p `ls`
end
```
https://github.com/ruby/irb/commit/4217a46f5d
2024-11-26 17:50:30 +00:00
Stan Lo
51bf0d4d68
[ruby/irb] Store method objects in constants
...
(https://github.com/ruby/irb/pull/1033 )
It probably won't speed up things significantly, but these are hot paths
and we can save a few method calls per completion/input call.
https://github.com/ruby/irb/commit/f1e25ec7ae
2024-11-20 18:59:26 +00:00
Stan Lo
2df2e868bc
[ruby/irb] Move main object's safe call logic to Context
...
(https://github.com/ruby/irb/pull/1034 )
https://github.com/ruby/irb/commit/9750fa23cc
2024-11-20 15:02:17 +00:00
tomoya ishida
bc92379664
[ruby/irb] Don't use delegator to install helper methods to main
...
object
(https://github.com/ruby/irb/pull/1031 )
IRB used delegator to install command as a method of frozen main object.
Command is not a method now. We can drop it.
https://github.com/ruby/irb/commit/2f1c593801
2024-11-19 13:17:11 +00:00
Kouhei Yanagita
3f7c72cd33
[ruby/irb] Correct ja/help-message for --context-mode and --prompt
...
(https://github.com/ruby/irb/pull/1029 )
https://github.com/ruby/irb/commit/b21432daf7
2024-11-07 12:52:01 +00:00
YO4
ed06f018bd
[ruby/irb] windows does not support Process.kill("TERM", pid)
...
(https://github.com/ruby/irb/pull/1026 )
https://github.com/ruby/irb/commit/7bbb885163
2024-11-05 13:53:41 +00:00
tomoya ishida
09ddfd4d1c
[ruby/irb] Always use alternate sceen on alt-d
...
(https://github.com/ruby/irb/pull/988 )
https://github.com/ruby/irb/commit/db0a923d62
2024-10-18 17:15:11 +00:00
tomoya ishida
cf8388f76c
[ruby/irb] Remove bignum check from save_history
...
(https://github.com/ruby/irb/pull/1018 )
IRB need to accept bignum history size, but we don't want explicit bignum checks because threshold of bignum and fixnum depends on platform.
https://github.com/ruby/irb/commit/5151467e6a
2024-10-13 13:00:20 +00:00
Gert Goet
eccfb6e60c
[ruby/irb] History refactors ( https://github.com/ruby/irb/pull/1013 )
...
* Extract logic save_history in separate helper
* Extract logic history_file in helper
* Allow for readonly history
https://github.com/ruby/irb/commit/52307f9026
2024-10-11 16:34:19 +00:00
tomoya ishida
cb19dfca2c
[ruby/irb] Change debug test workaround to use ENV
...
RUBY_DEBUG_TEST_UI
(https://github.com/ruby/irb/pull/1014 )
https://github.com/ruby/irb/commit/9933584754
2024-10-08 15:15:43 +00:00
tomoya ishida
98620f6c52
[ruby/irb] Change default completor from regexp to auto, try
...
TypeCompletor and fallback to RegexpCompletor.
(https://github.com/ruby/irb/pull/1010 )
https://github.com/ruby/irb/commit/bb6a99d815
2024-10-06 11:10:12 +00:00
tomoya ishida
a8a921aef3
[ruby/irb] Use correct binding in debug mode
...
(https://github.com/ruby/irb/pull/1007 )
In debug command, IRB's context was using wrong binding.
Some code colorization, command detection failed because binding.local_variable returned wrong value.
https://github.com/ruby/irb/commit/68f718de21
2024-10-02 03:18:35 +00:00
Stan Lo
49057f36ef
[ruby/irb] Bump version to v1.14.1
...
(https://github.com/ruby/irb/pull/1009 )
https://github.com/ruby/irb/commit/04cd2317ef
2024-09-26 13:38:04 +00:00
tomoya ishida
34e008d075
[ruby/irb] Fix debug command in nomultiline mode
...
(https://github.com/ruby/irb/pull/1006 )
* Fix debug command in nomultiline mode
* context.colorize_code -> context.colorize_input
https://github.com/ruby/irb/commit/71f4d6bfb5
2024-09-20 10:13:39 +00:00
tomoya ishida
6c4ce72609
[ruby/irb] Use InstructionSequence#script_lines to get method source
...
(https://github.com/ruby/irb/pull/1005 )
It works with both prism and parse.y
https://github.com/ruby/irb/commit/bcfaa72d5a
2024-09-16 17:36:27 +00:00
tomoya ishida and Stan Lo
a542479a75
[ruby/irb] Remove KEYWORD_ALIASES which handled special alias name
...
of irb_break irb_catch and irb_next command
(https://github.com/ruby/irb/pull/1004 )
* Remove KEYWORD_ALIASES which handled special alias name of irb_break irb_catch and irb_next command
* Remove unused instance variable user_aliases
Co-authored-by: Stan Lo <stan001212@gmail.com >
---------
https://github.com/ruby/irb/commit/f256d7899f
Co-authored-by: Stan Lo <stan001212@gmail.com >
2024-09-12 15:04:37 +00:00
tomoya ishida
f1349924df
[ruby/irb] Fix easter_egg run without RDoc, fix input-method test
...
run without RDoc
(https://github.com/ruby/irb/pull/998 )
* EasterEgg no longer depend on RDoc
* Run most of the input-method tests even if RDoc is not avialable
https://github.com/ruby/irb/commit/30fa1595d9
2024-09-03 15:45:40 +00:00
tomoya ishida
ce6b0c4425
[ruby/irb] Colorize command input
...
(https://github.com/ruby/irb/pull/983 )
https://github.com/ruby/irb/commit/0e64136e76
2024-08-28 16:16:31 +00:00
Stan Lo
87fa75c5db
[ruby/irb] Move parse_command method to Context
...
(https://github.com/ruby/irb/pull/993 )
Since Context dictates whether a line is a command or an expression,
moving the parse_command method to Context makes the relationship
more explicit.
https://github.com/ruby/irb/commit/9a4487af61
2024-08-27 12:49:23 +00:00
tomoya ishida
002e785e77
[ruby/irb] Fix kill pager pid throwing Errno::ESRCH when pager
...
process already terminated
(https://github.com/ruby/irb/pull/989 )
https://github.com/ruby/irb/commit/949f032e9b
2024-08-14 18:06:53 +00:00
tomoya ishida
f2f177edb3
[ruby/irb] Improve easter_egg logo resolution
...
(https://github.com/ruby/irb/pull/987 )
https://github.com/ruby/irb/commit/ab394db93f
2024-08-14 04:06:07 +00:00
Stan Lo
4a4e1bf357
[ruby/irb] Group class methods under class << self
...
(https://github.com/ruby/irb/pull/981 )
https://github.com/ruby/irb/commit/cdaa356df2
2024-07-16 15:58:15 +00:00
Stan Lo
abaa1b913d
[ruby/irb] Bump version to v1.14.0
...
(https://github.com/ruby/irb/pull/980 )
https://github.com/ruby/irb/commit/6a9e129714
2024-07-06 17:55:00 +00:00
Stan Lo
32ba86c9be
[ruby/irb] Return only commands when completing help command's
...
argument
(https://github.com/ruby/irb/pull/973 )
The command only takes command names as arguments, so we should only
return command names as candidates.
This will help users find a command faster as completion will be
another useful hint too.
https://github.com/ruby/irb/commit/7b6557cc24
2024-07-05 17:51:17 +00:00
Stan Lo
7fe5f0a1d0
[ruby/irb] Introduce cd command
...
(https://github.com/ruby/irb/pull/971 )
It's essentially a combination of pushws and popws commands that are
easier to use.
Help message:
```
Usage: cd ([target]|..)
IRB uses a stack of workspaces to keep track of context(s), with `pushws` and `popws` commands to manipulate the stack.
The `cd` command is an attempt to simplify the operation and will be subject to change.
When given:
- an object, cd will use that object as the new context by pushing it onto the workspace stack.
- "..", cd will leave the current context by popping the top workspace off the stack.
- no arguments, cd will move to the top workspace on the stack by popping off all workspaces.
Examples:
cd Foo
cd Foo.new
cd @ivar
cd ..
cd
```
https://github.com/ruby/irb/commit/4a0e0e89b7
2024-07-03 17:17:42 +00:00
Stan Lo
921f22e563
[ruby/irb] Improve how command calls' return value is handled
...
(https://github.com/ruby/irb/pull/972 )
In #934 , we changed command calls to return nil only. This PR improves
the behaviour even further by:
- Not echoing the `nil` returned by command calls
- Not overriding previous return value stored in `_` with the
`nil` from commands
https://github.com/ruby/irb/commit/c844176842
2024-06-18 15:15:23 +00:00
Stan Lo
ce6a1ba9a1
[ruby/irb] Bump version to v1.13.2
...
(https://github.com/ruby/irb/pull/970 )
https://github.com/ruby/irb/commit/35de7dacd4
2024-06-15 20:14:01 +00:00
Stan Lo
aa61d4237d
[ruby/irb] Add accidentally dropped disable_irb command back
...
(https://github.com/ruby/irb/pull/964 )
* Add accidentally dropped disable_irb command back
* Sort command files require by name
https://github.com/ruby/irb/commit/1d627cebca
2024-06-05 16:29:29 +00:00
tomoya ishida
a8c1ef6a60
[ruby/irb] Remove useless Reline::Key.new and update wrong comment
...
for alt+d
(https://github.com/ruby/irb/pull/963 )
https://github.com/ruby/irb/commit/a572180b3a
2024-06-04 12:09:15 +00:00
Kevin Newton
84d2bacb42
[ruby/irb] Reorder ruby lex clauses for unrecoverable first
...
(https://github.com/ruby/irb/pull/956 )
When a syntax error includes multiple error messages, we want to
check for unrecoverable messages first so that we do not
accidentally match a recoverable error later in the message.
https://github.com/ruby/irb/commit/2f42b2360d
2024-05-17 02:44:57 +00:00
Stan Lo
c68bb24088
[ruby/irb] Add a new initialization step to validate IRB.conf's
...
values
(https://github.com/ruby/irb/pull/953 )
Currently, users can only find out that they have set a wrong value
for IRB configs when the value is used, with opaque error messages like
"comparison of Integer with true failed (TypeError)".
This commit adds a new initialization step to validate the values of
some IRB configs, so that users can find out about the wrong values
during the initialization of IRB.
https://github.com/ruby/irb/commit/af8ef2948b
2024-05-10 11:40:58 +00:00
Kevin Newton and Stan Lo
69d0a3b033
[ruby/irb] Simplify regexp to account for prism error messages
...
(https://github.com/ruby/irb/pull/954 )
https://github.com/ruby/irb/commit/e0c29be074
Co-authored-by: Stan Lo <stan001212@gmail.com >
2024-05-10 09:39:11 +00:00
Stan Lo
93cffcf961
[ruby/irb] Bump version to v1.13.1
...
(https://github.com/ruby/irb/pull/951 )
https://github.com/ruby/irb/commit/66318d0a34
2024-05-05 11:11:31 +00:00
Stan Lo
e973f9cbb3
[ruby/irb] Clarify that the context is IRB context
...
(https://github.com/ruby/irb/pull/950 )
https://github.com/ruby/irb/commit/8cde57f55a
2024-05-05 10:44:52 +00:00
tomoya ishida
96710a3139
[ruby/irb] Change debug test workaround only enabled when output is
...
tty
(https://github.com/ruby/irb/pull/949 )
https://github.com/ruby/irb/commit/3f231b8622
2024-05-04 09:03:55 +00:00
Stan Lo
bd42f0898d
[ruby/irb] Improve help message for no meta commands
...
(https://github.com/ruby/irb/pull/948 )
* Remove unnecessary code from command tests
* Improve help message for no meta commands
1. Add placeholder values for both command category and description
2. Update help command's output to give different types of categories
more explicit ordering
https://github.com/ruby/irb/commit/b1ef58aeff
2024-05-04 03:32:34 +00:00
Stan Lo
fb2ea7084f
[ruby/irb] Use flag instead of caller for debug's binding.irb
...
check
(https://github.com/ruby/irb/pull/947 )
https://github.com/ruby/irb/commit/4a4d7a4279
2024-05-04 03:22:17 +00:00
Kenichi Kamiya and Stan Lo
a510175e8f
[ruby/irb] Avoid raising errors while running help for custom
...
commands
(https://github.com/ruby/irb/pull/944 )
* Avoid raising errors while running help for custom commands
Raising an error from the help command is not a pleasure for the
end user, even if the command does not define any attributes
* Update test/irb/command/test_custom_command.rb
---------
https://github.com/ruby/irb/commit/c8bba9f8dc
Co-authored-by: Stan Lo <stan001212@gmail.com >
2024-05-03 22:08:49 +00:00
Stan Lo
945a99e81a
Sync IRB 241e061
2024-05-02 14:33:30 -04:00
tomoya ishida
032070d793
[ruby/irb] Add workaround for ruby/debug/test/console/irb_test
...
failing with StdioInputMethod
(https://github.com/ruby/irb/pull/943 )
https://github.com/ruby/irb/commit/acf3c1816e
2024-05-02 16:21:46 +00:00
Stan Lo
fef6f5f2e1
[ruby/irb] Bump version to v1.13.0
...
(https://github.com/ruby/irb/pull/941 )
* Bump version to v1.13.0
* Add Documentation category to changelog
https://github.com/ruby/irb/commit/b9b1f35c99
2024-05-01 15:20:01 +00:00
tomoya ishida
77f5301cd1
[ruby/irb] Let IRB::Color.colorable? always return true|false
...
(https://github.com/ruby/irb/pull/940 )
https://github.com/ruby/irb/commit/0bbe435ffe
2024-05-01 14:52:53 +00:00