summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-05-18Add Reline.test_mode to use with special I/Oaycabta
2019-05-18skip a test to pass CIs.Koichi Sasada
I'm debugging [Bug #15821] but my patch introduces another issue. So I simply skip this test and re-enable it later.
2019-05-18Add test for UNTILNobuyoshi Nakada
2019-05-18Distinguish pre-condition and post-condition loopsNobuyoshi Nakada
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-17skip tests for GC.compact to pass CI.Koichi Sasada
Now, GC.compact has issues which makes rubyci RED, so I skip this test and debug soon.
2019-05-17Test to disable ASCII-only optimizationNobuyoshi Nakada
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
2019-05-16Fix fd leakNobuyoshi Nakada
merged https://github.com/rubygems/rubygems/pull/2765
2019-05-15Allow --enable/--disable options to take an argumentNobuyoshi Nakada
[Bug #15850]
2019-05-14Add object packing strategies for compactionAaron Patterson
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.
2019-05-14Rename Reline's test file name because of typoaycabta
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-14Check encoding when Readline completionaycabta
2019-05-14fix visibility of SecureRandom.gen_randomUrabe, Shyouhei
Aliasing a method preserves its visibility. These aliases turn formerly-public methods into private. Should make them public again. [Bug #15847]
2019-05-13delegate.rb: don't look for methods on KernelÉtienne Barrié
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
2019-05-13Check that Reline exists on testaycabta
2019-05-13Skip tests depend on Readline's special behaviorsaycabta
2019-05-13Add ed_search_prev_history to Relineaycabta
2019-05-13Use LineEditor#reset on testaycabta
2019-05-12Revert "Add a test for em_capitol_case of Reline"aycabta
This reverts commit b1767e56b158d8307412a0928a7ac2366541429d.
2019-05-12Add a test for em_capitol_case of Relineaycabta
2019-05-10Adjust indentNobuyoshi Nakada
2019-05-10Add one more retry for win32ole event matcherTakashi Kokubun
to fix https://ci.appveyor.com/project/ruby/ruby/builds/24438615/job/yld1utsltxag9dr2
2019-05-09str_duplicate: Don't share with a frozen shared stringAlan Wu
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
2019-05-09require 'stringio'NARUSE, Yui
2019-05-08Trim MJIT output from TestHideSkipTakashi Kokubun
to prevent failure like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cd28aa6ab79a30008ee819b?step=5cd28b2403f44600070db083 with --jit-verbose=1.
2019-05-07Avoid triggering autoload in Module#const_defined?(String)Jean Boussier
[Bug #15780]
2019-05-05Fix use of numbered parameter inside proc that is default value of optargJeremy Evans
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]
2019-05-05Fix a case where numbered parameters should not be allowedJeremy Evans
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]
2019-05-05parse.y: duplicated when clause warningNobuyoshi Nakada
* parse.y (case_args): moved "duplicated when clause" warning from compile phase, so that `ruby -wc` shows them.
2019-05-04ignore test_RangeErrorMasatoshi SEKI
2019-05-04add DRb::WeakIdConv (Bug #15711)Masatoshi SEKI
2019-05-01Silence a (probable) debug printNobuyoshi Nakada
2019-05-01Windows simply causes an error to open invalid pathNAKAMURA Usaku
2019-05-01Add exception support in `Range#first`.manga_osyo
Closes: https://github.com/ruby/ruby/pull/2163
2019-04-30Skip on Windows now when using reline because it causes hang of whole testsNAKAMURA Usaku
2019-04-30Use Ripper for IRBaycabta
The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
2019-04-30Use Encoding::UTF_8 if RELINE_TEST_ENCODING doesn't existaycabta
2019-04-30Use Encoding::UTF_8 if Encoding.default_external is Encoding::IBM437aycabta
2019-04-30Add Reline as a fallback library for Readlineaycabta
* 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.
2019-04-29Disallow also CR in here-doc identifierNobuyoshi Nakada
* 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.
2019-04-29Make only `mesg` can be assigned with default `fname`Nobuyoshi Nakada
2019-04-29parse.y: fix here-doc identifier with newlineNobuyoshi Nakada
* 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 ```
2019-04-28numeric.c: Extend Integer#[] to support range argumentsYusuke Endoh
```` 0b01001101[2, 4] #=> 0b0011 0b01001100[2..5] #=> 0b0011 0b01001100[2...6] #=> 0b0011 ^^^^ ```` [Feature #8842]
2019-04-28test/ruby/test_integer.rb: Add a sane test for Integer#[]Yusuke Endoh
2019-04-28make sync-default-gems GEM=irbTakashi Kokubun
from https://github.com/ruby/irb/commit/e8e79d569ed59fe4ed4fbca968917ce799f02a5e. This colorizes Range object on IRB inspect.
2019-04-28make sync-default-gems GEM=irbTakashi Kokubun
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.
2019-04-28make sync-default-gems GEM=irbTakashi Kokubun
from https://github.com/ruby/irb/commit/44301d382794d91e2caa16dd4efe62439e0041d8. This includes some fixes for string interpolation highlight fixes.
2019-04-28Update rubygems with latest upstream changesDavid Rodríguez
Closes: https://github.com/ruby/ruby/pull/2154