summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-12-08memory_view.c: Add rb_memory_view_extract_item_members (#3855)Kenta Murata
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-12-08Windows: Read ENV names and values as UTF-8 encoded Strings (#3818)Lars Kanis
* Windows: Read ENV names and values as UTF-8 encoded Strings Implements issue #12650: fix https://bugs.ruby-lang.org/issues/12650 This also removes the special encoding for ENV['PATH'] and some complexity in the code that is unnecessary now. * Windows: Improve readablity of getenv() encoding getenv() did use the expected codepage as an implicit parameter of the macro. This is mis-leading since include/ruby/win32.h has a different definition. Using the "cp" variable explicit (like the other function calls) makes it more readable and consistent. * Windows: Change external C-API macros getenv() and execv() to use UTF-8 They used to process and return strings with locale encoding, but since all ruby-internal spawn and environment functions use UTF-8, it makes sense to change the C-API equally. Notes: Merged-By: nurse <naruse@airemix.jp>
2020-12-08[ruby/reline] Editing to initial content is not just cursor movingaycabta
https://github.com/ruby/reline/commit/0a4f175b0a
2020-12-07Removed deprecated Time#succNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3841
2020-12-07Revert getaddrinfo_a()Masaki Matsushita
getaddrinfo_a() gets stuck after fork(). To avoid this, we need 1 second sleep to wait for internal worker threads of getaddrinfo_a() to be finished, but that is unacceptable. [Bug #17220] [Feature #17134] [Feature #17187]
2020-12-07Revert "memory_view.c: Add rb_memory_view_extract_item_members"Kenta Murata
This reverts the following three commits. - ce707079c153f389d861c91a8dccc510fab0e245 - 1a76bb56b0ba99a19d1373c4c8ebac42e7b6f27c - 51500eedefa492699668ced3e07e330a9a4d53ee
2020-12-06memory_view.c: Add rb_memory_view_extract_item_membersKenta Murata
2020-12-05Reduce timeout of test_getaddrinfo_after_forkMasaki Matsushita
2020-12-05[ruby/matrix] Optimize **Marc-Andre Lafortune
Avoiding recursive call would imply iterating bits starting from most significant, which is not easy to do efficiently. Any saving would be dwarfed by the multiplications anyways. [Feature #15233] Notes: Merged: https://github.com/ruby/ruby/pull/3844
2020-12-05[ruby/reline] Process insertion buffer forciblyaycabta
https://github.com/ruby/reline/commit/89d49ec9e0
2020-12-05[ruby/reline] Support bracketed paste modeaycabta
https://github.com/ruby/reline/commit/d1a6869322
2020-12-05[ruby/reline] Forced newline insertion is not just cursor movingaycabta
https://github.com/ruby/reline/commit/0e30a49d03
2020-12-05[ruby/reline] Drop prompt list cache when num of lines is changedaycabta
https://github.com/ruby/reline/commit/1959e22043
2020-12-05[ruby/reline] Key strokes like 2dl should behave d2laycabta
Key strokes, vi arg, operator, and motion should be treated as operator, vi arg, and motion. https://github.com/ruby/reline/commit/d1a7e74aa4
2020-12-05[ruby/reline] Add test `Reline::Unicode.test_get_mbchar_width`.manga_osyo
https://github.com/ruby/reline/commit/301e9048fc
2020-12-05[ruby/reline] Add alias vi-movement-mode to vi-command-mode for compatibilityaycabta
https://github.com/ruby/reline/commit/a79c297567
2020-12-05[ruby/reline] Call process_insert when the end of pasting plural fullwidth charsaycabta
https://github.com/ruby/reline/commit/594484d9f9
2020-12-05[ruby/reline] Motions e, E, t, f should include a char on cursor if follows ↵aycabta
operator https://github.com/ruby/reline/commit/86e9a76499
2020-12-05[ruby/reline] Implement vi_yankaycabta
https://github.com/ruby/reline/commit/164aaf9a5f
2020-12-05[ruby/reline] Operator with arg need to make sure that they take arg to ↵aycabta
avoid crashing https://github.com/ruby/reline/commit/1c0c06de1f
2020-12-05[ruby/reline] Unimplemented vi command should be no-opaycabta
https://github.com/ruby/reline/commit/abc90e6867
2020-12-05[ruby/reline] Keep operator proc as a local variable in the scopeaycabta
The proc variable will be used later so the instance variable will be changes. https://github.com/ruby/reline/commit/496c4361f6
2020-12-05[ruby/reline] Skip em_exchange_mark without markaycabta
https://github.com/ruby/reline/commit/abb56e5ec3
2020-12-05[ruby/reline] Bypass newline insertion at eol on command promptaycabta
A newline is automatically inserted if a character is rendered at eol on command prompt. https://github.com/ruby/reline/commit/2dfd5d0df8
2020-12-05[ruby/reline] Deduplicate completed itemsaycabta
https://github.com/ruby/reline/commit/2dabf0c786
2020-12-05[ruby/reline] Add tests about complicated renderingaycabta
https://github.com/ruby/reline/commit/f4683b72eb
2020-12-05[ruby/reline] Test prompt with escape sequenceaycabta
https://github.com/ruby/reline/commit/c7c1d5f5d1
2020-12-05[ruby/reline] Use startup_option instead of startup waitaycabta
https://github.com/ruby/reline/commit/a63ce6371c
2020-12-05[ruby/reline] Wait for the process to be started in start_terminalaycabta
https://github.com/ruby/reline/commit/d29d33dcf5
2020-12-05[ruby/reline] Add write_inputrcaycabta
https://github.com/ruby/reline/commit/70536d8c9a
2020-12-04Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &&Benoit Daloze
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
2020-12-04Add a hook before fork() for getaddrinfo_a()Masaki Matsushita
We need stop worker threads in getaddrinfo_a() before fork(). This change adds a hook before fork() that cancel all outstanding requests and wait for all ongoing requests. Then, it waits for all worker threads to be finished. Fixes [Bug #17220]
2020-12-04[ruby/logger] Consider cygwin a Windows platformJeremy Evans
This should fix Ruby Bug 12468. https://github.com/ruby/logger/commit/49de53d1fc
2020-12-04[ruby/mutex_m] Fix `Mutex_m#initialize` when the super's initialize has kwargsMasataka Pocke Kuwabara
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com> https://github.com/ruby/mutex_m/commit/84ca1fc108
2020-12-04SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2Hiroshi SHIBATA
2020-12-04[ruby/set] Add `Set#<=>`Marc-Andre Lafortune
https://github.com/ruby/set/commit/447974a374
2020-12-04[ruby/set] Remove SortedSet implementationsAkinori MUSHA
It required RBTree to perform decently and the external dependency was not suitable for a standard library. The pure ruby fallback implementation was originally meant to be an example of how to write a subclass of Set, and its poor performance was not suitable for use in production. I decided it should be distributed as an external library instead of bundling it with Set. https://github.com/ruby/set/commit/dfcc8e568b
2020-12-04[ruby/set] Resurrect support for Ruby 2.xAkinori MUSHA
In Ruby 2.x, initialize_copy does not take a freeze option. https://github.com/ruby/set/commit/3da6c309df
2020-12-04[ruby/zlib] Add Zlib::Inflate#inflate :buffer keyword argumentJeremy Evans
If a buffer keyword argument is given, it is used as the buffer, instead of creating new strings. This can result in significantly lower memory usage during inflation. Implements #19 https://github.com/ruby/zlib/commit/dac9a9b57d
2020-12-04[ruby/zlib] Allow Zlib.crc32 and .adler32 to accept IO instanceJeremy Evans
This reads from the IO in 8192 byte chunks, so you don't need to have the entire string in memory. Fixes #16 https://github.com/ruby/zlib/commit/ba9793c550
2020-12-04memory_view.c: Fix endianness of n, N, v, VKenta Murata
2020-12-03test/ruby/test_io.rb: some test methods had been overwrittenYusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201203T123002Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1830: warning: method redefined; discarding old test_each_byte /home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:376: warning: previous definition of test_each_byte was here test/unit warning: method TestIO#test_each_byte is redefined /home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1849: warning: method redefined; discarding old test_each_char /home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1799: warning: previous definition of test_each_char was here test/unit warning: method TestIO#test_each_char is redefined ```
2020-12-03delete deprecated IO-like methods卜部昌平
This commit deletes {IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4. Note that String also has those methods. They are neither depreacted nor deleted because they are not aliases of counterpart each_something.
2020-12-02Do not reduce quantifiers if it affects which text will be matchedJeremy Evans
Quantifier reduction when using +?)* and +?)+ should not be done as it affects which text will be matched. This removes the need for the RQ_PQ_Q ReduceType, so remove the enum entry and related switch case. Test that these are the only two patterns affected by testing all quantifier reduction tuples for both the captured and uncaptured cases and making sure the matched text is the same for both. Fixes [Bug #17341] Notes: Merged: https://github.com/ruby/ruby/pull/3808
2020-12-02ENV.index: delete卜部昌平
Has been deprecated since 373282f6656d3d3d989d261e7a95f8e81b5c9712.
2020-12-02Revert "Removed deprecated Dir.exists? and File.exists?"Nobuyoshi Nakada
This reverts commit 1a5205536f0c0d6021450b11722919211847df86.
2020-12-02Removed deprecated Dir.exists? and File.exists?Nobuyoshi Nakada
2020-12-02memory_view.c: Check availability in rb_memory_view_getKenta Murata
2020-12-01tune parallel testKoichi Sasada
This patch contains the fowllowing hacks: (1) Add "--timetable-data=FILE" option for test-all This option enables to dump timeline event contains worker, suite, and start/end time. (2) remove TestJIT in test_jit_debug.rb on parallel test. it is duplicated test. (3) move test_jit.rb and test_jit_debug.rb at first because these two tests are bottleneck of parallel tests. On my environment, `make test-all TESTS=-j12` reduced the total time 190 seconds -> 140 seconds. Notes: Merged: https://github.com/ruby/ruby/pull/3826
2020-11-30Fix rb_interned_str_* functions to not assume static stringsJean Boussier
Fixes [Feature #13381] When passed a `fake_str`, `register_fstring` would create new strings with `str_new_static`. That's not what was expected, and answer almost no use cases. Notes: Merged: https://github.com/ruby/ruby/pull/3786