summaryrefslogtreecommitdiff
path: root/test/readline
AgeCommit message (Collapse)Author
2020-09-16Merge latest readline-extaycabta
2020-03-30Ruby 2.7 backport about IRB (#2990)aycabta
* [ruby/reline] Sort completion list #### Legacy mode: ```console $ irb --legacy irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` #### Before this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] local_variables loop lambda load ``` #### After this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` https://github.com/ruby/reline/commit/6074069c7d * Drop an invalid char as UTF-8 * Add test_completion_with_indent_and_completer_quote_characters This is for 8a705245e55575d4d310a2e956b89a36a5931971. * [ruby/irb] Add tests for RubyLex The set_auto_indent method calculates the correct number of spaces for indenting a line. We think there might be a few bugs in this method so we are testing the current functionality to make sure nothing breaks when we address those bugs. Example test failure: ``` 1) Failure: TestIRB::TestRubyLex#test_auto_indent [/Users/Ben/Projects/irb/test/irb/test_ruby_lex.rb:75]: Calculated the wrong number of spaces for: def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else . <10> expected but was <12>. ``` https://github.com/ruby/irb/commit/752d5597ab * [ruby/reline] Degenerate the terminal size to [$LINES, $COLUMNS] if it is unknown This is a workaround for https://github.com/ruby/irb/issues/50 https://github.com/ruby/reline/commit/5725677d1a * [ruby/irb] Fix newline depth with multiple braces This commit fixes the check_newline_depth_difference method to multiple open braces on one line into account. Before this change we were subtracting from the depth in check_newline_depth_difference on every open brace. This is the right thing to do if the opening and closing brace are on the same line. For example in a method definition we have an opening and closing parentheses we want to add 1 to our depth, and then remove it. ``` def foo() end ``` However this isn't the correct behavior when the brace spans multiple lines. If a brace spans multiple lines we don't want to subtract from check_newline_depth_difference and we want to treat the braces the same way as we do `end` and allow check_corresponding_token_depth to pop the correct depth. Example of bad behavior: ``` def foo() [ ] puts 'bar' end ``` Example of desired behavior: ``` def foo() [ ] puts 'bar' end ``` https://github.com/ruby/irb/commit/7dc8af01e0 * text/readline/test_readline.rb - fix skip on Reline (#2743) TestRelineAsReadline#test_input_metachar passes on MinGW * Add "require 'openstruct'" what is forgotten * [ruby/irb] Fix lib name of OpenStruct https://github.com/ruby/irb/commit/1f3a84ab6b * Add load path and require for ruby/ruby * Rescue EOFError If C-d is pressed before IRB is ready, IRB crashes because EOFError occurs. * Complete indented and quoted string correctly def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug. * [ruby/irb] Fix crashing when multiple open braces per line https://github.com/ruby/irb/issues/55 If we had put multiple open braces on a line the with no closing brace spaces_of_nest array keeps getting '0' added to it. This means that when we pop off of this array we are saying that we should be in position zero for the next line. This is an issue because we don't always want to be in position 0 after a closing brace. Example: ``` [[[ ] ] ] ``` In the above example the 'spaces_of_nest' array looks like this after the first line is entered: [0,0,0]. We really want to be indented 4 spaces for the 1st closing brace 2 for the 2nd and 0 for the 3rd. i.e. we want it to be: [0,2,4]. We also saw this issue with a heredoc inside of an array. ``` [<<FOO] hello FOO ``` https://github.com/ruby/irb/commit/80c69c8272 * Support history-size in .inputrc correctly * Introduce an abstracted structure about the encoding of Reline The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline. * Remove an unused setting variable * Use Reline.encoding_system_needs if exists * Add tests for vi_insert and vi_add * Implement vi_insert_at_bol and vi_add_at_eol * [ruby/reline] Implement vi_to_next_char https://github.com/ruby/reline/commit/066ecb0a21 * [ruby/reline] Implement vi_prev_char and vi_to_prev_char https://github.com/ruby/reline/commit/0ad3ee63fa * [ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that assertions can be there https://github.com/ruby/readline-ext/commit/4d44c12832 * Stop using minitest dependent methods * Skip a test that uses assert_ruby_status if it doesn't exist * Use omit instead of skip * Check DONT_RUN_RELINE_TEST envvar * [ruby/irb] Add newline_before_multiline_output https://github.com/ruby/irb/commit/9eb1801a66 * [ruby/irb] Fix compatibility with rails before 5.2 Rails before 5.2 added Array#append as an alias to Array#<< , so that it expects only one argument. However ruby-2.5 added Array#append as an alias to Array#push which takes any number of arguments. If irb completion is used in `rails c` (for example "IO.<tab>") it fails with: irb/completion.rb:206:in `<<': wrong number of arguments (given 3, expected 1) (ArgumentError) Using Array#push instead of Array#append fixes compatibility. https://github.com/ruby/irb/commit/5b7bbf9c34 * Reline: Use a more robust detection of MinTTY The previous detection per get_screen_size fails when stdout is passed to a pipe. That is the case when running ruby tests in parallel ("-j" switch). In this case Reline believes that it's running on MinTTY and the tests are running with ANSI IOGate instead of the Windows adapter on MINGW. So parallel test results were different to that of a single process. This commit fixes these differencies. The code is taken from git sources and translated to ruby. NtQueryObject() is replaced by GetFileInformationByHandleEx(), because NtQueryObject() is undocumented and is more difficult to use: https://github.com/git-for-windows/git/blob/c5a03b1e29c69f3f06c8fabd92493edb73469176/compat/winansi.c#L558 * Reline: Fix changed test results due to change to UTF-8 on Windows In commit f8ea2860b0cac1aec79978e6c44168802958e8af the Reline encoding for native windows console was changed to hardcoded UTF-8. This caused failures in reline and readline tests, but they were hidden, because parallel ruby tests incorrectly used Reline::ANSI as IOGate. Tests failures were raised in single process mode, but not with -j switch. This patch corrects encodings on native Windows console. * [ruby/irb] [ruby/irb] Rewrite an expression to detect multiline https://github.com/ruby/irb/commit/ed5cf375a6 https://github.com/ruby/irb/commit/5b7bbf9c34 * [ruby/reline] Implement vi_change_meta https://github.com/ruby/reline/commit/8538e0e10f * Always refer to Reline::IOGate.encoding * Always use UTF-8 for Reline::GeneralIO on Windows * Use test_mode on Reline::History::Test for encoding * [ruby/reline] Support GNOME style Home/End key sequences [Bug #16510] https://github.com/ruby/reline/commit/788f0df845 * [ruby/irb] Add a new easter egg: dancing ruby https://github.com/ruby/irb/commit/e37dc7e58e * [ruby/irb] Exclude useless files from RDoc https://github.com/ruby/irb/commit/8f1ab2400c * [ruby/irb] Exclude useless files from RDoc * Fix inaccuracy in encoding tests These tests assume Encoding.find('locale') == Encoding.find('external') and fail if they are distinct. * [ruby/reline] Fix Reline::Windows#scroll_down I mistook Right and Bottom. https://github.com/ruby/reline/commit/8be401c5f5 * [ruby/reline] Bypass cursor down when a char is rendered at eol on Windows A newline is automatically inserted if a character is rendered at eol on Windows command prompt. https://github.com/ruby/reline/commit/4bfea07e4a * [ruby/reline] Organize special keys escape sequences https://github.com/ruby/reline/commit/41deb1a3d9 * [ruby/readline-ext] Remove unnecessary -I$(top_srcdir) when it's an individual gem https://github.com/ruby/readline-ext/commit/efaca4a5f4 * [ruby/readline-ext] Check TestRelineAsReadline existance https://github.com/ruby/readline-ext/commit/c0a6303168 * [ruby/readline-ext] The ruby/assert.h is adopted by Ruby 2.7 or later https://github.com/ruby/readline-ext/commit/106c31fc1b * Revert "[ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that assertions can be there" This reverts commit 425b2064d394639101854c83a061a0918b33b857. This cherry-pick was a mistake. * [ruby/readline-ext] Use require check instead of DONT_RUN_RELINE_TEST env https://github.com/ruby/readline-ext/commit/1df99d1481 * [ruby/readline-ext] Add spec.extensions https://github.com/ruby/readline-ext/commit/8c33abb13c * [ruby/readline-ext] Use rake/extensiokntask to build https://github.com/ruby/readline-ext/commit/b0b5f709bd * Fix readline build dependency * [ruby/irb] Add test_complete_symbol https://github.com/ruby/irb/commit/dbbf086c1f * [ruby/irb] Check doc namespace correctly IRB::InputCompletor::PerfectMatchedProc crashes when doc not found because a variable name was incorrect. https://github.com/ruby/irb/commit/889fd4928f * [ruby/irb] Fix auto indent with closed brace A closed brace in auto-indent shouldn't affect the next brace in the same line, but it behaves like below: p() { } It's a bug. https://github.com/ruby/irb/commit/fbe59e344f * [ruby/irb] Use 0.step instead of (..0).each for Ruby 2.5 https://github.com/ruby/irb/commit/5d628ca40e * Revert "[ruby/irb] Add test_complete_symbol" This reverts commit 3af3431c2c145134996e66f3d8d9ade8ad81bde0. * [ruby/irb] fix reserved words and completion for them https://github.com/ruby/irb/commit/6184b227ad * Add test_complete_symbol The previous version of the test method used a symbol, ":abcdefg" to complete but longer symbols that can be completed are defined by other test methods of other libs. * test/irb/test_completion.rb: suppress a warning: unused literal ignored * [ruby/reline] Use IO#write instead of IO#print IO#print always adds a string of $\ automatically. https://github.com/ruby/reline/commit/a93119c847 * [ruby/irb] Version 1.2.2 https://github.com/ruby/irb/commit/a71753f15a * [ruby/reline] Version 0.1.3 https://github.com/ruby/reline/commit/ea2b182466 * [ruby/irb] Include easter-egg.rb in gemspec `irb` doesn't run because this file isn't included in the gem. https://github.com/ruby/irb/commit/73cda56d25 * [ruby/irb] Version 1.2.3 https://github.com/ruby/irb/commit/dd56e06df5 * support multi-run test for test_readline.rb * [ruby/irb] `yield` outside method definition is a syntax error https://github.com/ruby/irb/commit/dbc7b059c7 * test/readline - allow ENV control of test class creation In ruby/ruby, the tests run on both readline & reline by creating four test classes: ``` TestReadline TestReadlineHistory TestRelineAsReadline TestRelineAsReadlineHistory ``` Reline inports the test files and uses them in its CI. Adding the ENV control allows it to only run the `TestRelineAsReadline` classes. * Omit test_using_quoting_detection_proc_with_multibyte_input temporarily for random order test * support random order test. test_readline: HISTORY should be empty. test_using_quoting_detection_proc: test_using_quoting_detection_proc_with_multibyte_input: Readline.completer_quote_characters= and Readline.completer_word_break_characters= doesn't accept nil, so skip if previous values are nil. * Set Readline.completion_append_character = nil always GNU Readline add a white space when Readline.completion_append_character is not initialized. * Fix a typo [ci skip] * skip test if Reline.completion_proc is nil. Some other tests can set Reline.completion_proc, so if it is nil, simply skip this test. * Reset Reline.point TestRelineAsReadline#test_insert_text expects Readline.point == 0 at the beginning of the test, but a test violate this assumption. * Convert incompatible encoding symbol names * Ignore incompatible convert of symbols * Add workaround for test-bundler failure https://github.com/ruby/actions/runs/500526558?check_suite_focus=true#step:16:127 ``` Failures: 1) Bundler.setup when Bundler is bundled doesn't blow up Failure/Error: expect(err).to be_empty expected `"fatal: not a git repository (or any of the parent directories): .git\nfatal: not a git repository (o...the parent directories): .git\nfatal: not a git repository (or any of the parent directories): .git".empty?` to return true, got false Commands: $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle install --retry 0 Resolving dependencies... Using bundler 2.1.4 Bundle complete! 1 Gemfile dependency, 1 gem now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle exec ruby -e \ require\ \'bundler\'\;\ Bundler.setup fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 # ./spec/bundler/runtime/setup_spec.rb:1056:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (2 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:78:in `block (2 levels) in <top (required)>' make: *** [yes-test-bundler] Error 1 ``` * [ruby/irb] Unnamed groups are not captured when named groups are used https://github.com/ruby/irb/commit/0a641a69b0 * [ruby/reline] Work with wrong $/ value correctly https://github.com/ruby/reline/commit/962ebf5a1b * [ruby/irb] Detect multiple lines output simplify The old implementation performance test code: require 'objspace' puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) /\A.*\Z/ !~ ('abc' * 20_000_000) puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) and run `time test.rb`: 2.5868 MB 62.226 MB real 0m1.307s user 0m0.452s sys 0m0.797s The new implementation performance test code: require 'objspace' puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) ('abc' * 20_000_000).include?("\n") puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) and run `time test.rb`: 2.5861 MB 62.226 MB real 0m0.132s user 0m0.088s sys 0m0.042s https://github.com/ruby/irb/commit/40d6610baf * [ruby/reline] Suppress error in case INPUTRC env is empty https://github.com/ruby/reline/commit/bce7e7562b * [ruby/reline] Add yamatanooroti rendering test https://github.com/ruby/reline/commit/f092519525 * [ruby/reline] Rename test suite name of yamatanooroti test https://github.com/ruby/reline/commit/b0f32f5de4 * [ruby/reline] Add a comment why rescue yamatanooroti loading error on the test https://github.com/ruby/reline/commit/2a8061daec * [ruby/irb] Suppress crashing when EncodingError has occurred without lineno https://github.com/ruby/irb/commit/13572d8cdc * [ruby/reline] Suppress error when check ambiguous char width in LANG=C https://github.com/ruby/reline/commit/623dffdd75 * [ruby/io-console] Enable only interrupt bits on `intr: true` https://github.com/ruby/io-console/commit/baaf929041 * [ruby/io-console] bump up to 0.5.4 * [ruby/io-console] Update the minimum requirement of Ruby version https://github.com/ruby/io-console/commit/73e7b6318a * [ruby/io-console] Filter Ruby engine name rather than just /ruby/ This breaks tests using this path on JRuby because the `jruby` executable turns into `jjruby` after the sub. https://github.com/ruby/io-console/commit/e5951aa34c * [ruby/io-console] bump up to 0.5.5 * [ruby/io-console] Prefer keyword arguments https://github.com/ruby/io-console/commit/5facbfc4c8 * [ruby/io-console] [DOC] Improved about `intr:` https://github.com/ruby/io-console/commit/82b630cd79 * [ruby/io-console] Just ignore the extension on other than CRuby https://github.com/ruby/io-console/commit/41b6f09574 * [ruby/io-console] bump up to 0.5.6 Co-authored-by: KOBAYASHI Shuji <shuujii@gmail.com> Co-authored-by: Ben <kanobt61@gmail.com> Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Kenta Murata <mrkn@mrkn.jp> Co-authored-by: Lars Kanis <lars@greiz-reinsdorf.de> Co-authored-by: Lars Kanis <kanis@comcard.de> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> Co-authored-by: Nobuhiro IMAI <nov@yo.rim.or.jp> Co-authored-by: Nick Lewis <nick@puppet.com> Co-authored-by: S-H-GAMELINKS <gamelinks007@gmail.com> Co-authored-by: Koichi Sasada <ko1@atdot.net> Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com> Co-authored-by: Charles Oliver Nutter <headius@headius.com>
2019-12-17Fix return condition according to the condition to skipaycabta
2019-12-17Check wether Readline.completion_append_character= existsaycabta
2019-12-13Check wether TestReadline is definedaycabta
2019-12-12Some tests failed with before GNU Readline 6.0 on Windowsaycabta
2019-12-11The result of Readline.completion_proc should have the same encoding of ↵aycabta
Encoding.default_external
2019-12-11skip continuous failure test.Koichi Sasada
On mingw this test fails and not solved long time, so skip it. Please revert it when it solved. https://ci.appveyor.com/project/ruby/ruby/builds/29458671/job/9nbcjnfe6p0xnxoe
2019-12-09Remove workaround encoding modificationaycabta
2019-12-08Skip completion tests for Editlineaycabta
2019-12-08Fix encoding of completed listaycabta
2019-12-08Add test_simple_completion for Readlineaycabta
2019-11-18More fixes for $SAFE/taint post mergingJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-18Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans
This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-05Assert return value of Readline.readline only if Ruby is before 2.7aycabta
2019-08-27Fix use_lib_reline for test/readlineaycabta
2019-07-30Do not always taint the result of File#pathJeremy Evans
The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
2019-07-29Revert "Do not always taint the result of File#path"Jeremy Evans
This reverts commit 1a759bfe5d554c22571d2e6e4e5998cf06a7b98f. This fails on some operating systems.
2019-07-29Do not always taint the result of File#pathJeremy Evans
The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
2019-05-29Revert 3b7862c8e88cd7838a53ec083ac5733386400956 causing various CI hangsTakashi Kokubun
and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. RubyCI and ci.rvm.jp are almost dead by timeout since this commit. --- Revert "Skip a reline test hanging on Wercker since 3b7862c8e8" This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. Revert "Remove extra items because Reline::HISTORY is a sized queue" This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd. Revert "Use existing instances for LineEditor and Config" This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
2019-05-29Skip a reline test hanging on Wercker since 3b7862c8e8Takashi Kokubun
like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cedad11105780001c4e7001?step=5cedaf6b48fad200076fe77b
2019-05-22Skip assertion in readline test if Readline version is 4.3Jeremy Evans
Previously, the entire method was not run for Readline 4.3, probably because it was known to fail. Commit c754e979d3eeca51f1b13778f19f347df3da656e removed the check for Readline 4.3. Other than this one assertion, which also doesn't work when using Reline, the method runs correctly when using Readline 4.3. Fixes [Bug #15853].
2019-05-18Add Reline.test_mode to use with special I/Oaycabta
2019-05-18Remove parent namespace from Readline test classesaycabta
The namespace "Readline" doesn't exist when running tests if readline.so doesn't exist and Reline exists. So test classes shouldn't be at nested namespaces under "Readline".
2019-05-14Test ext/readline and lib/reline by test/readlineaycabta
2019-05-14Add an assertion message to test of Readline's class variablesaycabta
2019-05-13Check that Reline exists on testaycabta
2019-05-13Skip tests depend on Readline's special behaviorsaycabta
2019-04-30Skip on Windows now when using reline because it causes hang of whole testsNAKAMURA Usaku
2018-12-28test_readline.rb: skip readline test for new solaris11s-sunck0kubun
for now. This should be fixed, but let me make this new CI green first to introduce Solaris-related changes later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02Readline: expose rl_completion_quote_character variablenobu
[Feature #13050] From: georgebrock (George Brocklehurst) <ruby@georgebrock.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test_readline.rb: skip teardown failurek0kubun
https://ci.appveyor.com/project/ruby/ruby/build/9271/job/e88212s136mr0dgr I'll take a look at MSP-Greg's patch on readline later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15skip tests failing on AppVeyor MinGWk0kubun
Let me skip this to make CI green first and take a look later... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Fix test-all tests to avoid creating report_on_exception warningseregon
* The warnings are shown by Thread.report_on_exception defaulting to true. [Feature #14143] [ruby-core:83979] * Improves tests by narrowing down the scope where an exception is expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-15suppress warning: assigned but unused variable - linenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-15suppress warning: assigned but unused variable - linenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30Supress warnings.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03rl_char_is_quoted_pnobu
* ext/readline/readline.c (readline_s_set_quoting_detection_proc): support rl_char_is_quoted_p. [Feature #12659] * ext/readline/readline.c (readline_s_get_quoting_detection_proc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13* test/readline/test_readline.rb: Restore environment variables:akr
COLUMNS LINES git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14readline.c: initialize before rl_refresh_linenobu
* ext/readline/readline.c (readline_s_refresh_line): initialize before rl_refresh_line(), as some function make the internal state non-clean but rl_refresh_line() does not re-initialize it. [ruby-core:43957] [Bug #6232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29test/readline/test_readline.rb: Close fds.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28* test/readline/test_readline.rb (teardown): Clear Readline.input andakr
Readline.output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c, test/readline/test_readline.rb: fixkouji
indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c (readline_s_set_point, Init_readline):kouji
add Readline.point=(pos). Patched by naruse. [ruby-dev:47535] [Feature #8675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e