summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-06-23Clear rdoc options in the global rubygems configurationNobuyoshi Nakada
2021-06-23Clear default configurationsNobuyoshi Nakada
Remove environment variables which can affect the default configurations.
2021-06-23Make temporary directory under the regular locationNobuyoshi Nakada
2021-06-23Close UserInteraction for tests to fix leaked file descriptorsNobuyoshi Nakada
2021-06-23[ruby/rdoc] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/8460a36d84
2021-06-23[ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rbHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/fb264c4cc4 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-06-23[ruby/rdoc] Rwrite test-case for rubygems_hook without Gem::TestCaseHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/f8d1087ce5
2021-06-23Strip trailing spacesNobuyoshi Nakada
2021-06-22[ruby/irb] Sort ls result ordered by anscestryKeiko Kaneko
https://github.com/ruby/irb/commit/fdd5c0a71e
2021-06-22Rework `sysread` to use blocking `read_internal_locktmp`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4592
2021-06-22Avoid a duplicated method definition of Object#stubYusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210622T063005Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/rubygems/helper.rb:1565: warning: method redefined; discarding old stub /home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/resolv/test_dns.rb:8: warning: previous definition of stub was here ```
2021-06-21Fix finish_using_lib_relineaycabta
2021-06-21Call super method by teardown of tests of Reline as Readlineaycabta
2021-06-21Call Reline-specific method in helper fileaycabta
2021-06-21Rescue conversion error of inputrcaycabta
2021-06-21Call Reline.test_reset in teardown of tests for readline definitelyaycabta
2021-06-21Use test encoding for TestRelineAsReadline and TestRelineAsReadlineHistoryaycabta
2021-06-21Stop using global constant, RELINE_TEST_ENCODINGaycabta
2021-06-21Call Reline.test_reset in teardown definitelyaycabta
2021-06-21Revert "Use Encoding.default_external for tests of Readline::HISTORY"aycabta
This reverts commit 089a26b0a619a649b1958061df8f21a6cdc6cacd.
2021-06-21Use Encoding.default_external for tests of Readline::HISTORYaycabta
2021-06-21[ruby/reline] Remove an obsolete commented-out testaycabta
https://github.com/ruby/reline/commit/5354d02e03
2021-06-21[ruby/reline] Add yamatanooroti test about set and exchange markaycabta
https://github.com/ruby/reline/commit/2e6fdca5c6
2021-06-21[ruby/reline] Reset config for random testaycabta
https://github.com/ruby/reline/commit/c39615e1dd
2021-06-21[ruby/reline] Handle Errno::ENOTTY correctlyaycabta
https://github.com/ruby/reline/commit/8daa392ba6
2021-06-21[ruby/reline] Add a test for pasting Cyrillic chars into command prompt on ↵aycabta
cp 850 This closes https://github.com/ruby/reline/issues/103. https://github.com/ruby/reline/commit/213e0523d5
2021-06-21[ruby/reline] The config file must accept any character encodingaycabta
In Japan, so many programmers used EUC-JP to write text files that contain Japanese. Many .inputrc files which contain EUC-JP are still being copied and used. This commit supports the whole encoding of what user set including UTF-8. ref. https://github.com/ruby/reline/pull/280 https://github.com/ruby/reline/commit/0b45022e16
2021-06-21[ruby/reline] Use ReadConsoleInputW() instead of getwch()aycabta
This needs https://github.com/aycabta/yamatanooroti/pull/19, which is released by yamatanooroti gem 0.0.7, to test with yamatanooroti. https://github.com/ruby/reline/commit/06c1f45da1
2021-06-21[ruby/reline] ensure reline's encoding is used when reading inputrc ↵Mark Delk
character values This change ensures we use `Reline::IOGate`'s `encoding` when converting characters from their integer values. This fixes an issue that may occur if you have UTF characters in your `.inputrc`, but your default encoding isn't set. For example: ``` > 127864.ord.chr RangeError: 127864 out of char range from (pry):1:in `chr' > Reline::IOGate.encoding => #<Encoding:UTF-8> > 127864.ord.chr(Reline::IOGate.encoding) => "🍸" ``` https://github.com/ruby/reline/commit/cf372fc0fc
2021-06-18ast.rb: RubyVM::AST.parse and .of accepts `save_script_lines: true`Yusuke Endoh
This option makes the parser keep the original source as an array of the original code lines. This feature exploits the mechanism of `SCRIPT_LINES__` but records only the specified code that is passed to RubyVM::AST.of or .parse, instead of recording all parsed program texts. Notes: Merged: https://github.com/ruby/ruby/pull/4581
2021-06-17[rubygems/rubygems] Close then unlink tempfiles on WindowsNobuyoshi Nakada
In ruby/ruby test actions, number of "leaked tempfile" messages are shown on Windows. As Windows disallows removing open files, `Tempfile#unlink` fails silently before `#close`. Close then unlink by `#close!` instead. https://github.com/rubygems/rubygems/commit/fe0b88ac30
2021-06-15Time#getlocal tests for [Feature #17544]Nobuyoshi Nakada
2021-06-14[Bug #17880] Set leaf false on opt_setinlinecache (#4565)Eileen M. Uchitelle
This change fixes the bug described in https://bugs.ruby-lang.org/issues/17880. Checking `ractor_shareable_p` will cause the method to call back into Ruby. Anything calling this method can't be a leaf instruction, otherwise it could crash. By adding `attr bool leaf = false` we no longer crash because it marks the function as not a leaf. Here's a simplified reproduction script: ```ruby require "set" class Id attr_reader :db_id def initialize(db_id) @db_id = db_id end def ==(other) other.class == self.class && other.db_id == db_id end alias_method :eql?, :== def hash 10 end def <=>(other) db_id <=> other.db_id if other.is_a?(self.class) end end class Namespace IDS = Set[ Id.new(1).freeze, Id.new(2).freeze, Id.new(3).freeze, Id.new(4).freeze, ].freeze class << self def test?(id) IDS.include?(id) end end end p Namespace.test?(Id.new(1)) p Namespace.test?(Id.new(5)) ``` Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-06-14[lib/ostruct] Fix YAML testMarc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/4572
2021-06-14[lib/ostruct] Allow overriding of `block_given?`Marc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/4572
2021-06-15Suppress exception report in inner threadNobuyoshi Nakada
2021-06-15Close leaked file descriptorsNobuyoshi Nakada
2021-06-14Add fallback block to `OpenStruct#delete_field` (#1409)jfrazx
Notes: Merged-By: marcandre <github@marc-andre.ca>
2021-06-14Fix fiber scheduler address resolve solaris testsBruno Sutic
Notes: Merged: https://github.com/ruby/ruby/pull/4571
2021-06-14Wake up join list within thread EC context. (#4471)Samuel Williams
* Wake up join list within thread EC context. * Consume items from join list so that they are not re-executed. If `rb_fiber_scheduler_unblock` raises an exception, it can result in a segfault if `rb_threadptr_join_list_wakeup` is not within a valid EC. This change moves `rb_threadptr_join_list_wakeup` into the thread's top level EC which initially caused an infinite loop because on exception will retry. We explicitly remove items from the thread's join list to avoid this situation. * Verify the required scheduler interface. * Test several scheduler hooks methods with broken `unblock` implementation. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-06-14Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)Samuel Williams
Co-authored-by: Bruno Sutic <code@brunosutic.com> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-06-08Make ENV.clone warn and ENV.dup raiseJeremy Evans
ENV.dup returned a plain Object, since all of ENV's behavior is defined in ENV's singleton class. So using dup makes no sense. ENV.clone works and is used in some gems, but it doesn't do what the user expects, since modifying ENV.clone also modifies ENV. Add a deprecation warning pointing the user to use ENV.to_h instead. This also undefines some private initialize* methods in ENV, since they are not needed. Fixes [Bug #17767] Notes: Merged: https://github.com/ruby/ruby/pull/4557 Merged-By: jeremyevans <code@jeremyevans.net>
2021-06-08[ruby/psych] Fix the test that does not work with libyaml-0.1.7Yusuke Endoh
https://github.com/ruby/psych/commit/542cf9754f
2021-06-07Do not use YAML module in tests of PsychHiroshi SHIBATA
2021-06-07Use assert_raise instead of assert_raisesHiroshi SHIBATA
2021-06-07[ruby/psych] Implement YAML.safe_dump to make safe_load more usable.Jean Boussier
In case where Psych is used as a two way serializers, e.g. to serialize some cache or config, it is preferable to have the same restrictions on both load and dump. Otherwise you might dump and persist some objects payloads that you later won't be able to read. https://github.com/ruby/psych/commit/441958396f
2021-06-03Warn more duplicate literal hash keysNobuyoshi Nakada
Following non-special_const literals: * T_REGEXP Notes: Merged: https://github.com/ruby/ruby/pull/4548
2021-06-03Warn more duplicate literal hash keysNobuyoshi Nakada
Following non-special_const literals: * T_BIGNUM * T_FLOAT (non-flonum) * T_RATIONAL * T_COMPLEX Notes: Merged: https://github.com/ruby/ruby/pull/4548
2021-06-03Assertions for duplicate literal hash key warningsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4548
2021-06-03[rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid ↵Yusuke Endoh
"test_" prefix This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb", and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb". The two files are a helper for tests, not test files. However, a file starting with "test_" prefix is handled as a test file directly loaded by test-unit because Rakefile specifies: ``` t.test_files = FileList['test/**/test_*.rb'] ``` Directly loading test/rubygems/test_utilities.rb caused "uninitialized constant Gem::TestCase". This issue was fixed by 59c682097197fee4052b47e4b4ab86562f3eaa9b, but the fix caused a "circular require" warning because test_utilities.rb and test_case.rb are now requiring each other. Anyway, adding "test_" prefix to a test helper file is confusing, so this changeset reverts the fix and solve the issue by renaming them. https://github.com/rubygems/rubygems/commit/6460e018df