| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/670)
Since assignment check relies on tokenization with `Ripper`, it feels like
the responsibility of `RubyLex`. `Irb#eval_input` should simply get the result
when calling `each_top_level_statement` on `RubyLex`.
https://github.com/ruby/irb/commit/89d1adb3fd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/677)
We already skipped history integration tests in core CI in #675 due to
suspicion on nested IRB sessions don't work on certain operating systems.
But after #669, the evaluation integration test also started to fail on
some Core CI suites. So, it looks like the integration test setup may not
work in Core CI, at least in some suites.
Consider `ruby/irb` already has rather sophisticated test suite, I think
it's better to skip the integration tests in core CI for now.
https://github.com/ruby/irb/commit/6f49b4c108
|
|
|
|
|
|
|
| |
semicolon
(https://github.com/ruby/irb/pull/669)
https://github.com/ruby/irb/commit/50185c2833
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/675)
Sometimes the subprocess gets stuck in the nested IRB session until timed
out. We don't have enough information to debug it yet, so skip the tests
to unblock CI.
https://github.com/ruby/irb/commit/606f18c80c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/652)
1. Dynamically including `HistorySavingAbility` makes things unnecessarily
complicated and should be avoided.
2. Because both `Reline` and `Readline` use a single `HISTORY` constant
to store history data. When nesting IRB sessions, only the first IRB
session should handle history loading and saving so we can avoid
duplicating history.
3. History saving callback should NOT be stored in `IRB.conf` as it's
recreated every time `IRB.setup` is called, which would happen when
nesting IRB sessions.
https://github.com/ruby/irb/commit/0fef0ae160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/635)
* Remove unused InputMethod#initialize
The constructor takes a `file_name` argument, but it is never used. The
only input method that needs a file is `FileInputMethod`, which has its
own constructor to take a file object directly.
So the constructor in `InputMethod` is not needed and its child classes
don't need to call `super` in their constructors.
* Remove unused FileInputMethod#file_name
https://github.com/ruby/irb/commit/153b1e9d1c
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/668)
https://github.com/ruby/irb/commit/bbd20445ea
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/667)
https://github.com/ruby/irb/commit/79fc6dcf5f
|
|
|
|
|
|
|
|
|
|
|
| |
tests
(https://github.com/ruby/irb/pull/660)
The ability to run a test case in a subprocess is useful for testing
many other features, like nested IRB sessions. So I think it's worth
extracting them into a new test case class.
https://github.com/ruby/irb/commit/73b7a895f8
|
|
|
|
|
|
|
|
| |
* Page ls command's output
* Use Pager.page_content in show_cmds too
https://github.com/ruby/irb/commit/82d1687302
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
environment
(https://github.com/ruby/irb/pull/647)
This can:
- Make it easier to scroll up and down the commands list
- Avoid pushing up users' previous output
- Allow users to do basic search with `/<word>`
https://github.com/ruby/irb/commit/f94e8a66dd
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/644)
* Avoid initialising Row at every test input
* Extract common assertion patterns into methods
* Remove unnecessary PromptRow strcut and boilerplate code
https://github.com/ruby/irb/commit/1ba586c0c6
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/643)
https://github.com/ruby/irb/commit/18bb4022a9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/640)
* Unpend rdoc dialog tests
Without these tests, we don't have any coverage on autocompletion's rdoc
dialog, which is what caused #638 to happen.
* Pull ri doc on CI for the doc dialog test
* Assert different screen result on CI and local machine
https://github.com/ruby/irb/commit/3ac96be660
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/623)
* Rename `ext/history.rb` to `ext/eval_history.rb`
To confusion with `lib/irb/history.rb`
* Add eval_history tests
* Rename eval_history's History to EvalHistory to avoid confusion
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/613)
Since `IRB.conf[:SAVE_HISTORY]` is assigned with 1000 by default, history-saving
is a feature enabled by default. So it should not be treated as an extension,
which adds unnecessary complexity to the code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/618)
* Test last value is assigned with measure enabled
* Remove unnecessary `result` variable
`Context#evaluate` always assigns the result of the evaluation to `_` so
we don't need to do it in `Irb#eval_input`.
* Move benchmarking logic into `Context#evaluate`
Current location of the benchmarking logic is too high up and includes
operations like command loading and argument transformation, which should
be excluded. So this commit moves it into `Context#evaluate` to reduce the
noise.
We don't move it further down to `Workspace#evaluate` because `Context`
is an argument of the measure block, which is not available in `Workspace`.
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/607)
https://github.com/ruby/irb/commit/9d97a192a5
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/619)
https://github.com/ruby/irb/commit/b7b071774f
|
|
|
|
|
|
|
| |
the value is always nil
(https://github.com/ruby/irb/pull/617)
https://github.com/ruby/irb/commit/62691384f8
|
|
|
|
|
|
|
| |
test
(https://github.com/ruby/irb/pull/614)
https://github.com/ruby/irb/commit/e68c6128aa
|
|
|
|
|
|
|
| |
check_code_block(rename to check_code_syntax)
(https://github.com/ruby/irb/pull/611)
https://github.com/ruby/irb/commit/b7f4bfaaa4
|
|
|
|
|
|
|
| |
string
(https://github.com/ruby/irb/pull/610)
https://github.com/ruby/irb/commit/f01ff0811b
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/515)
* Implement heredoc embdoc and string indentation with bugfix
* Fix test_ruby_lex's indentation value
* Add embdoc indent test
* Add workaround for lines==[nil] passed to auto_indent when exit IRB with CTRL+d
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/608)
https://github.com/ruby/irb/commit/1cd3b45402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add new features easily
(https://github.com/ruby/irb/pull/500)
* Add nesting level parser for multiple use (indent, prompt, termination check)
* Rewrite RubyLex using NestingParser
* Add nesting parser tests, fix some existing tests
* Add description comment, rename method to NestingParser
* Add comments and tweak code to RubyLex
* Update NestingParser test
* Extract list of ltype tokens to constants
|
|
|
|
|
|
|
| |
of prefix
(https://github.com/ruby/irb/pull/603)
https://github.com/ruby/irb/commit/359cb28def
|
|
|
|
|
|
|
| |
completion candidates including newline characters
(https://github.com/ruby/irb/pull/539)
https://github.com/ruby/irb/commit/aaf0c46645
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/599)
I received a `RegexpError` when I typed `::Array[`.
::Array[/Users/mi/ghq/github.com/ruby/irb/lib/irb/completion.rb:236:in `retrieve_completion_data': premature end of char-class: /^Array[/ (RegexpError)
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/595)
Because they are handled differently in `ruby/irb` and `ruby/ruby`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/594)
* Use require_relative for envutil.rb
Requiring test helper files with `require_relative` allows running the tests
with `ruby -Itest test/irb/test_debug_cmd.rb` without having to set up
the load path.
* Replace reline hack with TERM=dumb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/589)
* Allow `show_source` for private methods
Fix https://github.com/ruby/irb/pull/577
* Pend tests on TruffleRuby
It seems `eval(..., __LINE__ + 1)` does not work.
Other similar tests are also pended on TruffleRuby, so I think it
is acceptable.
* Use `private_method_defined?` instead of `defined?`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix typo
* s/braking/breaking/g
Co-authored-by: Stan Lo <stan001212@gmail.com>
---------
https://github.com/ruby/irb/commit/5f8e69f5f2
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/586)
Because the assertions for `dynamic_prompt` lives inside a block given to
`RubyLex`, they could be skipped unnoticed if the setup is not correct.
This commit adds a simple assertion to check if the block was actually
executed.
|
|
|
|
|
|
|
| |
set_input
(https://github.com/ruby/irb/pull/585)
https://github.com/ruby/irb/commit/b5f3efdcf0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/576)
* Simplify each_top_level_statement, reduce instance vars
* Update lib/irb/ruby-lex.rb
Co-authored-by: Stan Lo <stan001212@gmail.com>
* Remove unused ltype from TestRubyLex#check_state response
* Remove unnecessary const path of TerminateLineInput
* Combine duplicated code state check into method
---------
https://github.com/ruby/irb/commit/172453cec4
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/583)
1. Make `RubyLex#set_input` simply assign the input block. This matches
the behavior of `RubyLex#set_prompt`.
2. Merge `RubyLex#set_input`'s IO configuration logic with `#set_auto_indent`
into `#configure_io`.
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/567)
* Give show_doc its own command class
* Print deprecation warning for `help` command
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/582)
* Suppress Reline::IOGate.cursor_pos writing escape sequence in test_debug_cmd
* Force use Reline::GeneralIO as Reline::IOGate and remove RUBY_DEBUG_NO_RELINE option for debug test
|
|
|
|
|
|
|
| |
path
(https://github.com/ruby/irb/pull/572)
https://github.com/ruby/irb/commit/0b648adf38
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/570)
https://github.com/ruby/irb/commit/710d5b1af5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/568)
In https://github.com/ruby/irb/commit/3ee79e89adb8e21b63d796e53bcc86281685076d,
`encoding_aliases.rb` was introduced to return the correct encoding object for
`ujis` and `euc` encodings.
However, the return value of `@@legacy_encoding_alias_map[@encoding_name]`
is always overridden by a second look up with `Encoding.find(@encoding_name)`.
So the logic didn't work as expected.
This commit fixes the problem.
|
|
|
|
| |
This reverts commit e7cdce83e8c8797c481ccb54c260c0db1e1afa7c.
|
| |
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/566)
https://github.com/ruby/irb/commit/df32e024be
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/564)
The current method-redefining approach brings little benefit, makes it
harder to understand the code, and causes warnings like:
> warning: method redefined; discarding old execute
This patch simplifies it while displaying more helpful message when rdoc
couldn't be loaded.
|
|
|
|
|
|
|
|
|
| |
<Class/Module>`
(https://github.com/ruby/irb/pull/562)
Instead of always printing methods inherited from Class or Module, IRB by
default should filter them out unless `<Class/Module>` is specified to be
either of those.
|
|
|
|
|
|
|
| |
tokenizing issue
(https://github.com/ruby/irb/pull/558)
https://github.com/ruby/irb/commit/f68e891ed1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/555)
* Remove all Ruby 2.6 support
* Drop Ruby 2.6 specific testing conditions
* Only run Ruby 2.7+ on CI
* Bump Ruby requirement to 2.7+
https://github.com/ruby/irb/commit/3f714b616c
|
|
|
|
|
|
|
|
|
|
| |
Ruby implementations like JRuby and TruffleRuby already indicate their
compatibility target with RUBY_VERSION. We don't need to exclude
them from accepting keyword arguments as long as they target 2.7+.
https://github.com/ruby/irb/commit/bf20faa4e6
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
|