Граф коммитов

65 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun fa2e0cc018 [ruby/irb] Try using a different file name
hoping to address:
https://github.com/ruby/ruby/actions/runs/3506561941/jobs/5873689640

https://github.com/ruby/irb/commit/de9a6b9d00
2022-11-20 05:31:56 +00:00
Takashi Kokubun f47251671d [ruby/irb] Require rubygems for ruby/ruby
You can't take rubygems for granted in a default gem.
https://github.com/ruby/ruby/actions/runs/3506561943/jobs/5873689466

https://github.com/ruby/irb/commit/58bb3954d0
2022-11-20 05:19:50 +00:00
Takashi Kokubun e0f0367ab5 [ruby/irb] Fix CI failure on ruby/ruby
https://github.com/ruby/irb/commit/ea8c716922
2022-11-20 05:06:07 +00:00
Stan Lo 180ed611b2 [ruby/irb] Add edit command (https://github.com/ruby/irb/pull/453)
* Add edit command

* Make find_source a public singleton method

* Add document for the edit command

* Make find_end private

* Remove duplicated private

https://github.com/ruby/irb/commit/4321674aa7
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2022-11-20 04:47:54 +00:00
Yusuke Endoh ca1aa7afea Prevent a "method redefined" warning
http://rubyci.s3.amazonaws.com/ubuntu2004-arm/ruby-master/log/20221118T033003Z.log.html.gz
```
[21350/22024] TestIRB::ExtendCommandTest#test_show_source_end_finder/home/chkbuild/chkbuild/tmp/build/20221118T033003Z/ruby/test/irb/test_cmd.rb:523: warning: method redefined; discarding old show_source_test_method
/home/chkbuild/chkbuild/tmp/build/20221118T033003Z/ruby/test/irb/test_cmd.rb:523: warning: previous definition of show_source_test_method was here
 ```
2022-11-18 15:39:50 +09:00
st0012 1eae15142f [ruby/irb] Remove duplicated TestInputMethod definitions
https://github.com/ruby/irb/commit/4b831d02e1
2022-11-15 10:07:32 +00:00
Stan Lo 14a1394bcd [ruby/irb] Simplify info command's tests
(https://github.com/ruby/irb/pull/440)

https://github.com/ruby/irb/commit/5942949226
2022-11-11 21:05:35 +00:00
Takashi Kokubun 8fa83fa0b2 [ruby/irb] Transform ls's --grep/-G option to keyword args
(https://github.com/ruby/irb/pull/437)

* Transform ls's --grep/-G option to keyword args

* Make --grep less flexible

* Support -g instead of --grep

* Suppress warnings from symbol aliases
2022-11-10 22:55:15 +00:00
Takashi Kokubun 0de3bc92b4 [ruby/irb] Make $ and @ default aliases
(https://github.com/ruby/irb/pull/438)

https://github.com/ruby/irb/commit/0613589476
2022-11-10 17:31:15 +00:00
Stan Lo b7b78f062f [ruby/irb] Add execute_lines to reduce command tests' boilerplate
code
(https://github.com/ruby/irb/pull/436)

https://github.com/ruby/irb/commit/1595337149
2022-11-08 17:19:59 +00:00
Takashi Kokubun 9001e53e68 [ruby/irb] Support non-string input in show_source
(https://github.com/ruby/irb/pull/430)

* Support non-string input in show_source

* Test show_source as a method
2022-11-07 17:29:28 +00:00
Nobuyoshi Nakada b83074dac7 [ruby/irb] Suppress "switching inspect mode" messages
https://github.com/ruby/irb/commit/ee068d039b
2022-11-04 11:43:21 +00:00
Stan Lo a923203811 [ruby/irb] Provide a base test class and let tests restore encodings
conveniently
(https://github.com/ruby/irb/pull/429)

* Create a base TestIRB::TestCase class

* Save/restore encodings for tests that initializes InputMethod classes

Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.

`ReadlineInputMethod` also changes encodings but currently no tests
cover it.

* Remove unnecessary TestHelper module

Since we now have a base TestCase, without_rdoc can just live there.

https://github.com/ruby/irb/commit/c2874ec121
2022-11-03 22:13:11 +00:00
Takashi Kokubun a13836e70d [ruby/irb] Allow non-identifier aliases like Pry's @ and $
(https://github.com/ruby/irb/pull/426)

* Allow non-identifier aliases

* Move the configuration to IRB.conf

* Avoid abusing method lookup for symbol aliases

* Add more alias tests

* A small optimization

* Assume non-nil Context

* Load IRB.conf earlier

https://github.com/ruby/irb/commit/e23db5132e
2022-11-03 22:09:55 +00:00
Nobuyoshi Nakada 13e968c1cd [ruby/irb] Suppress sequence to inspect asian ambiguous width
https://github.com/ruby/irb/commit/a7097c5b80
2022-10-28 08:29:38 +00:00
Nobuyoshi Nakada 7440fc3eb4 [ruby/irb] Suppress "switching inspect mode" messages
https://github.com/ruby/irb/commit/565eeb3c19
2022-10-28 08:29:37 +00:00
Peter Zhu ea5972572b [ruby/irb] Fix warnings in test_cmd.rb
Fixes this warning:

    warning: assigned but unused variable - err

https://github.com/ruby/irb/commit/298fcb57a3
2022-10-27 15:29:52 -04:00
Stan Lo b260c1e8c8 [ruby/irb] Remove unnecessary test setup 2022-10-27 15:29:11 -04:00
Stan Lo 0dc2e1a764 [ruby/irb] Remove unnecessary warning check on help command
It's not an intentional behavior of the command and it behaves
differently in different environments. So checking it actually brings
more problem than benefit.

https://github.com/ruby/irb/commit/b3203bc784
2022-10-26 15:15:30 +00:00
Peter Zhu 73a0223f95 [ruby/irb] Rename test_helper.rb to helper.rb
The name test_helper.rb conflicts with the test_helper.rb in JSON,
causing build failures. This commit renames test_helper.rb to helper.rb.

https://github.com/ruby/irb/commit/b6a92bf6b3

Co-Authored-By: Stan Lo <stan001212@gmail.com>
2022-10-26 15:13:44 +00:00
st0012 cb95d834cc [ruby/irb] Don't insert new methods to Test::Unit::TestCase
Ruby CI runs irb and other Ruby core/stdlib tests in the same process.
So adding irb-specific helper to Test::Unit::TestCase could potentially
pollute other components' tests and should be avoided.
2022-10-26 10:44:29 -04:00
Stan Lo 2022470a95 [ruby/irb] Suppress warnings
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-10-26 10:44:26 -04:00
st0012 d889e810f3 [ruby/irb] Add test for the help command 2022-10-26 10:44:23 -04:00
aycabta 7b0f2d618e [ruby/irb] Remove unnecessary space in regexp
https://github.com/ruby/irb/commit/c24a8e2483
2021-12-20 16:19:37 +09:00
aycabta b96ef7684c [ruby/irb] Add East Asian Ambiguous Width to irb_info command
https://github.com/ruby/irb/commit/4cade4b7e5
2021-12-20 16:19:36 +09:00
Takashi Kokubun 82b87a8dc4 [ruby/irb] Clean up a duplicated definition
I simply forgot deleting it.

https://github.com/ruby/irb/commit/65399d5e9f
2021-10-11 15:25:05 +09:00
Takashi Kokubun 2e183c6273 [ruby/irb] trufflruby fails on the show_source test
https://github.com/ruby/irb/commit/460bd12b87
2021-10-10 23:23:48 -07:00
Takashi Kokubun b33caa5bbc [ruby/irb] Add a test of find_end for show_source command
https://github.com/ruby/irb/commit/68e6ca95a0
2021-10-10 23:23:47 -07:00
aycabta f1035248af [ruby/irb] Show code page by irb_info on Windows
https://github.com/ruby/irb/commit/6160d74199
2021-07-16 01:55:25 +09:00
aycabta 456d0019dd [ruby/irb] Escape space in free-spacing mode
https://github.com/ruby/irb/commit/085ac42947
2021-07-16 01:55:16 +09:00
aycabta 947d0198e0 [ruby/irb] Show LANG and LC_ALL env by irb_info
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

https://github.com/ruby/irb/commit/b431742430
2021-07-11 06:12:07 +09:00
Masataka Pocke Kuwabara e8c2b03ee1 [ruby/irb] Fix error on `ls object_cant_define_singleton`
such as `ls 42`, `ls :sym` and so on

https://github.com/ruby/irb/commit/b1d436a853
2021-06-30 20:55:18 +09:00
Nobuyoshi Nakada 3b615f4353
Strip trailing spaces 2021-06-23 10:08:51 +09:00
Keiko Kaneko de779f4a62 [ruby/irb] Sort ls result ordered by anscestry
https://github.com/ruby/irb/commit/fdd5c0a71e
2021-06-22 22:32:42 +09:00
Nobuyoshi Nakada c7601fb9ed [ruby/irb] Deal with different screen sizes
https://github.com/ruby/irb/commit/7118b3322f
2021-05-08 15:29:36 +09:00
Masataka Pocke Kuwabara de96ae9b71 [ruby/irb] Dump ancestors' methods by ls command
https://github.com/ruby/irb/commit/73edff287c
2021-05-08 14:00:40 +09:00
Nobuyoshi Nakada 4b92633043 [ruby/irb] Suppress verbose messages in the parallel test
`:VERBOSE` flag needs to be set prior to `IRB::Irb.new`.

https://github.com/ruby/irb/commit/0dbe292979
2021-04-05 14:00:21 +09:00
Takashi Kokubun 9e336f73fb [ruby/irb] Add show_source command
https://github.com/ruby/irb/commit/108cb04352
2021-04-02 16:40:06 +09:00
Nobuyoshi Nakada ccb0b7ab7d [ruby/irb] Suppress verbose messages in the parallel test
`:VERBOSE` flag needs to be set prior to `IRB::Irb.new`.

https://github.com/ruby/irb/commit/78604682d9
2021-04-02 01:47:58 +09:00
aycabta a1938ec308 [ruby/irb] Always add input method when calling Irb.new in tests
When passes input method as nil to Context.new through Irb.new,
ReidlineInputMethod.new is executed and the global internal state of Reline is
rewritten, therefore other tests are failed in the Ruby repository. This
commit changes to use TestInputMethod.

https://github.com/ruby/irb/commit/010dce9210
2021-03-29 05:10:08 +09:00
Nobuyoshi Nakada 4bc09c9696
Suppress verbose messages
Get rid of warnings in the parallel test.

```
unknown command: "Switch to inspect mode."
```
2021-03-23 08:20:02 +09:00
Takashi Kokubun 450d1f2c5c [ruby/irb] Deal with different screen sizes
e.g. http://rubyci.s3.amazonaws.com/centos8/ruby-master/log/20210321T063003Z.fail.html.gz

https://github.com/ruby/irb/commit/ddb3472ba2
2021-03-21 15:57:10 +09:00
Takashi Kokubun 232433f224 [ruby/irb] Add whereami command
https://github.com/ruby/irb/commit/bc822e4aac
2021-03-21 13:40:21 +09:00
Takashi Kokubun 5f72962a09 [ruby/irb] Implement ls command
https://github.com/ruby/irb/commit/19b6c20604
2021-03-21 12:59:51 +09:00
Kazuhiro NISHIYAMA e0dd072978
Fix errors when XDG_CONFIG_HOME points to non-writable directory
`$HOME/.config` is not writable on CI
because I think tests should not corrupt user's data.

And GitHub Actions CI sets `XDG_CONFIG_HOME`
since `Version: 20210309.1`.

https://github.com/ruby/actions/runs/2130811016?check_suite_focus=true#step:16:301
```
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
```
2021-03-18 15:20:41 +09:00
aycabta 6eb5b3ac27 [ruby/irb] The command "irb_info" should show RUBY_PLATFORM
https://github.com/ruby/irb/commit/39d1cd874f
2021-02-11 20:36:43 +09:00
aycabta 7b354cf67b [ruby/irb] Enable to reassign a new block with "measure" command
https://github.com/ruby/irb/commit/b444573aa2
2021-02-06 21:09:31 +09:00
aycabta 5704b5fe5e [ruby/irb] Allow "measure" command to take block
https://github.com/ruby/irb/commit/20f1ca23e9
2021-02-06 20:45:08 +09:00
aycabta 80fb4758a9 In test, need to pass a context to IRB::WorkSpace.new explicitly 2021-01-27 18:33:36 +09:00
Nobuhiro IMAI 69b42ae02d [ruby/irb] specify the `VERBOSE` to `false` and fix tests to fit
https://github.com/ruby/irb/commit/502c590925
2021-01-27 15:02:13 +09:00