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

238 Коммитов

Автор SHA1 Сообщение Дата
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
aycabta f57968e329 Set USE_COLORIZE to the default value in a test 2021-05-24 12:13:46 +09:00
jethrodaniel d06d4560a1 [ruby/irb] update test/irb/test_init.rb to avoid useless eval
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

https://github.com/ruby/irb/commit/2dfdc031ec
2021-05-24 11:56:05 +09:00
Mark Delk b8ffb1c46f [ruby/irb] respect NO_COLOR environment variable
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

https://github.com/ruby/irb/commit/401d0916fe
2021-05-24 11:55:58 +09:00
Nobuyoshi Nakada 34bc8210ed
test/irb/test_raise_no_backtrace_exception.rb: fix test file path
Create a file for test under the temporary directory.
2021-05-18 16:04:37 +09:00
Yusuke Endoh 1b61cdd5e0 test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8 2021-05-11 19:38:06 +09:00
Takashi Kokubun 66ca6ede16 [ruby/irb] Skip test_raise_exception_with_invalid_byte_sequence
on Windows for now. It seems like we haven't figured this out yet.

https://github.com/ruby/irb/commit/ecf5a1ace1
2021-05-11 14:46:33 +09:00
Takashi Kokubun afa70d079f
Explicitly specify encoding for another test as well
Same as e2ccc3301e
https://ci.appveyor.com/project/ruby/ruby/builds/39102539/job/k8m1yrrjesxbgvtq
2021-05-10 21:41:36 -07:00
Yusuke Endoh e2ccc3301e test/irb/test_raise_no_backtrace_exception.rb: UTF-8 is expected
... for the output of assert_in_out_err.

This will fix the following failure on many CI machines

http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20210511T030005Z.fail.html.gz
```
  1) Failure:
TestIRB::TestRaiseNoBacktraceException#test_raise_exception_with_different_encoding_containing_invalid_byte_sequence [/home/chkbuild/chkbuild/tmp/build/20210511T030005Z/ruby/test/irb/test_raise_no_backtrace_exception.rb:41]:
pid 221531 exit 0.

1. [1/2] Assertion for "stdout"
   | invalid byte sequence in US-ASCII.
```
2021-05-11 13:30:28 +09:00
Takashi Kokubun bb54361057 [ruby/irb] Skip the new IRB test on Windows for now
It's not passing from the beginning
https://github.com/ruby/ruby/runs/2550929220
https://ci.appveyor.com/project/ruby/ruby/builds/39100747

https://github.com/ruby/irb/commit/71fc180018
2021-05-11 13:01:38 +09:00
aycabta 774cc32b4d [ruby/irb] Treat encodings in exception correctly
https://github.com/ruby/irb/commit/4452adbe04
2021-05-11 09:32:08 +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 5219b4ddb4 [ruby/irb] Added setup and teardown to TestIRB::TestInit
Not to be affected by existing rc files in all tests.

https://github.com/ruby/irb/commit/bf434892b4
2021-04-26 21:15:06 +09:00
Nobuyoshi Nakada 8fdc45c894 [ruby/irb] Added `colorable` keyword option
Currently `IRB::Color.colorize` and `IRB::Color.colorize_code`
refer `$stdin.tty?` internally.
This patch adds `colorable` keyword option which overrides it.

https://github.com/ruby/irb/commit/402e3f1907
2021-04-26 21:14:52 +09:00
Nobuyoshi Nakada 687ab5dcad [ruby/irb] Assertions on non-tty
https://github.com/ruby/irb/commit/ede12890d2
2021-04-26 21:14:44 +09:00
Nobuyoshi Nakada 75f1ad8cb3 [ruby/irb] Added test_colorize
https://github.com/ruby/irb/commit/10e290fc3a
2021-04-26 21:14:37 +09:00
Nobuyoshi Nakada 6ddaad606e [ruby/irb] Added assert_equal_with_term
https://github.com/ruby/irb/commit/b690da96d8
2021-04-26 21:14:31 +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
aycabta ab89c45b90 [ruby/irb] Evaluate each toplevel statement
https://github.com/ruby/irb/commit/bc1b1d8bc3
2021-04-03 01:17:08 +09:00
aycabta 254cd937c2 [ruby/irb] Add test for multiline paste
https://github.com/ruby/irb/commit/e93c9cb54d
2021-04-03 01:15:46 +09:00
aycabta 0eb1491957 [ruby/irb] Add yamatanooroti test example
https://github.com/ruby/irb/commit/279155fcee
2021-04-03 01:14:31 +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 79af8ce6d7 [ruby/irb] Colorize `__END__` as keyword
https://github.com/ruby/irb/commit/9b84018311
2021-04-02 10:52:53 +09:00
Koichi Sasada 1ac68bba4e [ruby/irb] SIGINT should raise Interrupt after IRB session
https://github.com/ruby/irb/commit/5832cfe75b
2021-04-02 01:57:44 +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
aycabta ad8842c06d [ruby/irb] Cache completion files to require
https://github.com/ruby/irb/commit/612ebcb311
2021-03-25 18:54:02 +09:00
Nobuyoshi Nakada 2dcbc6ef96
[ruby/irb] fix completion test when out-of-place build 2021-03-24 16:10:27 +09:00
aycabta 0927756e58 [ruby/irb] Complete require and require_relative
https://github.com/ruby/irb/commit/1c61178b4c
2021-03-24 15:11:41 +09:00
aycabta 0259ee6008 [ruby/irb] Change ripper_lex_without_warning to a class method
https://github.com/ruby/irb/commit/d9f8abc17e
2021-03-24 14:39:50 +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
Takashi Kokubun 278522f053 [ruby/irb] Don't call Ruby 2.4+'s String#pretty_print
https://github.com/ruby/irb/commit/89bcf107be
2021-03-20 20:25:32 +09:00
Kazuhiro NISHIYAMA 85f99f4b71
Try to fix errors in TestIRB::TestHistory too
https://github.com/ruby/actions/runs/2137935523?check_suite_focus=true#step:9:562
```
  1) Error:
TestIRB::TestHistory#test_history_concurrent_use:
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `mkdir'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `fu_mkdir'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:231:in `block (2 levels) in mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `reverse_each'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `block in mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `each'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/irb/init.rb:355:in `rc_file_generators'
    /home/runner/work/actions/actions/ruby/lib/irb/init.rb:330:in `rc_file'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:170:in `block in assert_history'
    /home/runner/work/actions/actions/ruby/lib/tmpdir.rb:96:in `mktmpdir'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:168:in `assert_history'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:133:in `test_history_concurrent_use'
```
2021-03-18 18:07:18 +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
Jeremy Evans 14e1739ff3 [ruby/irb] Make save-history extension safe for concurrent use
This makes the save-history extension check for modifications to
the history file before saving it.  If the history file was modified
after the history was loaded and before it was saved, append only
the new history lines to the history file.

This can result in more lines in the history file than SAVE_HISTORY
allows.  However, that will be fixed the next time irb is run and
the history is saved.

Fixes [Bug #13654]

https://github.com/ruby/irb/commit/041ef53845
2021-03-06 00:18:32 +09:00
aycabta 182cde8dfb [ruby/irb] Add a test for not continuing when endless range at eol
https://github.com/ruby/irb/commit/1020ac9c65
2021-03-05 22:03:11 +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 b2d2d25b94 [ruby/irb] Suppress colorize on Windows tests
https://github.com/ruby/irb/commit/5be9354cf9
2021-02-11 20:31:29 +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
Nobuhiro IMAI b0fb208218 [ruby/irb] follow up the actual line number
https://github.com/ruby/irb/commit/7aed8fe3b1
2021-02-03 00:09:32 +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
Nobuhiro IMAI e80e5a2f89 [ruby/irb] use `RubyLex::TerminateLineInput` appropriately [Bug #17564]
* using the appropriciate exception instead of `break` so that the session
  can be continue after the `irb_source` and `irb_load` commands
* suppress extra new line due to one more `#prompt` call

https://github.com/ruby/irb/commit/bdefaa7cfd
2021-01-27 15:02:05 +09:00