summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* range.c (inspect_range): omit beginless "nil"Yusuke Endoh2019-05-231-0/+4
| | | | | | | | | | | | except the special case `(nil..nil)`. ``` (1..).inspect #=> "1.." (..5).inspect #=> "..5" (nil..nil).inspect #=> "nil..nil" ``` [Bug #15745]
* hash.c (rb_hash_s_create): Reject `Hash[[nil]]`Yusuke Endoh2019-05-231-6/+5
| | | | | | | The behavior of `Hash[[nil]] #=> {}` was a bug until 1.9.3, but had been remained with a warning because some programs depended upon it. Now, six years passed. We can remove the compatibility behavior. [Bug #7300]
* Use Reline.test_mode in Reline's test tooaycabta2019-05-222-0/+2
|
* Copy config to make IRB::Context#use_colorize? functionalTakashi Kokubun2019-05-211-0/+4
| | | | | | on initialize This fixes https://github.com/ruby/ruby/pull/2188
* re-skip tests of GC.compact.Koichi Sasada2019-05-211-0/+2
|
* Support DEL keyaycabta2019-05-211-0/+25
|
* enable test for GC.compact to reproduce an issue on CIKoichi Sasada2019-05-211-2/+0
|
* Do not modify shared arrayNobuyoshi Nakada2019-05-211-1/+0
| | | | [Bug #15821]
* Simplified the guard against old versionsNobuyoshi Nakada2019-05-211-5/+2
|
* Add "require 'irb'" to use IRB.confaycabta2019-05-211-0/+1
|
* 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
|