aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add Reline.test_mode to use with special I/Oaycabta2019-05-181-0/+1
|
* skip a test to pass CIs.Koichi Sasada2019-05-181-0/+1
| | | | | I'm debugging [Bug #15821] but my patch introduces another issue. So I simply skip this test and re-enable it later.
* Add test for UNTILNobuyoshi Nakada2019-05-181-0/+12
|
* Distinguish pre-condition and post-condition loopsNobuyoshi Nakada2019-05-181-0/+12
|
* Remove parent namespace from Readline test classesaycabta2019-05-181-5/+5
| | | | | | 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".
* skip tests for GC.compact to pass CI.Koichi Sasada2019-05-171-0/+2
| | | | | Now, GC.compact has issues which makes rubyci RED, so I skip this test and debug soon.
* Test to disable ASCII-only optimizationNobuyoshi Nakada2019-05-171-0/+10
| | | | | | | Examples why ASCII-only optimization cannot apply multi-byte encodings which have 7-bit trailing bytes. Suggested by @duerst at https://github.com/ruby/ruby/pull/2187#issuecomment-492949218
* Fix fd leakNobuyoshi Nakada2019-05-161-1/+1
| | | | merged https://github.com/rubygems/rubygems/pull/2765
* Allow --enable/--disable options to take an argumentNobuyoshi Nakada2019-05-151-0/+7
| | | | [Bug #15850]
* Add object packing strategies for compactionAaron Patterson2019-05-141-3/+4
| | | | | | | | This commit adds an alternative packing strategy for compaction. Instead of packing towards "most pinned" pages, we can pack towards "most empty" pages. The idea is that we can double the heap size, then pack all objects towards the empty side of the heap. This will ensure maximum chaos for testing / verification.
* Rename Reline's test file name because of typoaycabta2019-05-141-0/+0
|
* Test ext/readline and lib/reline by test/readlineaycabta2019-05-143-198/+225
|
* Add an assertion message to test of Readline's class variablesaycabta2019-05-141-1/+1
|
* Check encoding when Readline completionaycabta2019-05-141-1/+6
|
* fix visibility of SecureRandom.gen_randomUrabe, Shyouhei2019-05-141-0/+7
| | | | | | Aliasing a method preserves its visibility. These aliases turn formerly-public methods into private. Should make them public again. [Bug #15847]
* delegate.rb: don't look for methods on KernelÉtienne Barrié2019-05-131-0/+7
| | | | | | | | | Instead, look for instance methods of Kernel. Otherwise, instance methods of Module (which are methods of Kernel itself) are mistakenly believed to exist, and it fails when calling Kernel.instance_method(). Closes: https://github.com/ruby/ruby/pull/1422
* Check that Reline exists on testaycabta2019-05-131-3/+3
|
* Skip tests depend on Readline's special behaviorsaycabta2019-05-131-8/+12
|
* Add ed_search_prev_history to Relineaycabta2019-05-131-0/+13
|
* Use LineEditor#reset on testaycabta2019-05-132-6/+4
|
* Revert "Add a test for em_capitol_case of Reline"aycabta2019-05-121-24/+0
| | | | This reverts commit b1767e56b158d8307412a0928a7ac2366541429d.
* Add a test for em_capitol_case of Relineaycabta2019-05-121-0/+24
|
* Adjust indentNobuyoshi Nakada2019-05-101-1/+1
|
* Add one more retry for win32ole event matcherTakashi Kokubun2019-05-101-3/+3
| | | | | to fix https://ci.appveyor.com/project/ruby/ruby/builds/24438615/job/yld1utsltxag9dr2
* str_duplicate: Don't share with a frozen shared stringAlan Wu2019-05-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a. Before this commit, it was possible to create a shared string which shares with another shared string by passing a frozen shared string to `str_duplicate`. Such string looks like: ``` -------- ----------------- | root | ------ owns -----> | root's buffer | -------- ----------------- ^ ^ ^ ----------- | | | shared1 | ------ references ----- | ----------- | ^ | ----------- | | shared2 | ------ references --------- ----------- ``` This is bad news because `rb_fstring(shared2)` can make `shared1` independent, which severs the reference from `shared1` to `root`: ```c /* from fstr_update_callback() */ str = str_new_frozen(rb_cString, shared2); /* can return shared1 */ if (STR_SHARED_P(str)) { /* shared1 is also a shared string */ str_make_independent(str); /* no frozen check */ } ``` If `shared1` was the only reference to `root`, then `root` can be reclaimed by the GC, leaving `shared2` in a corrupted state: ``` ----------- -------------------- | shared1 | -------- owns --------> | shared1's buffer | ----------- -------------------- ^ | ----------- ------------------------- | shared2 | ------ references ----> | root's buffer (freed) | ----------- ------------------------- ``` Here is a reproduction script for the situation this commit fixes. ```ruby a = ('a' * 24).strip.freeze.strip -a p a 4.times { GC.start } p a ``` - string.c (str_duplicate): always share with the root string when the original is a shared string. - test_rb_str_dup.rb: specifically test `rb_str_dup` to make sure it does not try to share with a shared string. [Bug #15792] Closes: https://github.com/ruby/ruby/pull/2159
* require 'stringio'NARUSE, Yui2019-05-091-0/+1
|
* Trim MJIT output from TestHideSkipTakashi Kokubun2019-05-081-1/+5
| | | | | | to prevent failure like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cd28aa6ab79a30008ee819b?step=5cd28b2403f44600070db083 with --jit-verbose=1.
* Avoid triggering autoload in Module#const_defined?(String)Jean Boussier2019-05-071-0/+6
| | | | [Bug #15780]
* Fix use of numbered parameter inside proc that is default value of optargJeremy Evans2019-05-051-0/+2
| | | | | | | | | | | | | | | | This allows cases such as: ```ruby m ->(a = ->{@1}) {a} m.call.call(1) m2 ->(a: ->{@1}) {a} m2.call.call(2) ``` Previously, this would cause a syntax error. [Bug#15789]
* Fix a case where numbered parameters should not be allowedJeremy Evans2019-05-051-0/+2
| | | | | | | | | | | | | | | | | | Because `proc{|| @1}` is a syntax error, the following should also be syntax errors: ```ruby proc { | | @1} ``` ```ruby proc { |; a| @1 } ``` This fixes both cases. [Bug #15825]
* parse.y: duplicated when clause warningNobuyoshi Nakada2019-05-051-3/+14
| | | | | * parse.y (case_args): moved "duplicated when clause" warning from compile phase, so that `ruby -wc` shows them.
* ignore test_RangeErrorMasatoshi SEKI2019-05-041-8/+0
|
* add DRb::WeakIdConv (Bug #15711)Masatoshi SEKI2019-05-041-0/+17
|
* Silence a (probable) debug printNobuyoshi Nakada2019-05-011-0/+2
|
* Windows simply causes an error to open invalid pathNAKAMURA Usaku2019-05-011-1/+19
|
* Add exception support in `Range#first`.manga_osyo2019-05-011-0/+2
| | | | Closes: https://github.com/ruby/ruby/pull/2163
* Skip on Windows now when using reline because it causes hang of whole testsNAKAMURA Usaku2019-04-301-1/+2
|
* Use Ripper for IRBaycabta2019-04-301-108/+0
| | | | | The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
* Use Encoding::UTF_8 if RELINE_TEST_ENCODING doesn't existaycabta2019-04-301-3/+1
|
* Use Encoding::UTF_8 if Encoding.default_external is Encoding::IBM437aycabta2019-04-301-0/+2
|
* Add Reline as a fallback library for Readlineaycabta2019-04-306-0/+2690
| | | | | | | | | | | | | * lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible library. * lib/readline.rb: Readline uses a fallback to Reline when ext/readline doesn't exist. * tool/sync_default_gems.rb: add ruby/reline as a default gem. * appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit of Reline, and add "--exclude readline" to "nmake test-all" on Visual Studio builds because of strange behavior. * spec/ruby/library/readline/spec_helper.rb: skip Reline as with RbReadline.
* Disallow also CR in here-doc identifierNobuyoshi Nakada2019-04-291-0/+6
| | | | | | * parse.y (heredoc_identifier): CR in here-document identifier might or might not result in a syntax error, by the EOL code. make a syntax error regardless of the EOL code.
* Make only `mesg` can be assigned with default `fname`Nobuyoshi Nakada2019-04-291-1/+3
|
* parse.y: fix here-doc identifier with newlineNobuyoshi Nakada2019-04-291-4/+3
| | | | | | | | | | | | | | | * parse.y (heredoc_identifier): quoted here-document identifier must end within the same line. the only corner case that here-document identifier can contain a newline is that the closing qoute is placed at the beginning of the next line, and has been warned since 2.4. ```ruby <<"EOS " # warning: here document identifier ends with a newline EOS ```
* numeric.c: Extend Integer#[] to support range argumentsYusuke Endoh2019-04-281-0/+25
| | | | | | | | | | | ```` 0b01001101[2, 4] #=> 0b0011 0b01001100[2..5] #=> 0b0011 0b01001100[2...6] #=> 0b0011 ^^^^ ```` [Feature #8842]
* test/ruby/test_integer.rb: Add a sane test for Integer#[]Yusuke Endoh2019-04-281-0/+14
|
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-0/+1
| | | | | | from https://github.com/ruby/irb/commit/e8e79d569ed59fe4ed4fbca968917ce799f02a5e. This colorizes Range object on IRB inspect.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-7/+2
| | | | | | | from https://github.com/ruby/irb/commit/96f05e726879e9858eb015c8d043c9f52b864ff9. Just syncing newer test changes so that conflicts do not happen when trunk is modified and we need to backport that to ruby/irb.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-13/+9
| | | | | | from https://github.com/ruby/irb/commit/44301d382794d91e2caa16dd4efe62439e0041d8. This includes some fixes for string interpolation highlight fixes.
* Update rubygems with latest upstream changesDavid Rodríguez2019-04-2812-55/+149
| | | | Closes: https://github.com/ruby/ruby/pull/2154