summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-01-06[rubygems/rubygems] Fix suggestions flagximenasandoval
https://github.com/rubygems/rubygems/commit/b55a1393ca
2022-01-06[rubygems/rubygems] Let fetch understand gem:version syntaxximenasandoval
Fix version error message Add tests to fetch error messages Fix default version since is not necessary https://github.com/rubygems/rubygems/commit/070620ebe4
2022-01-06[rubygems/rubygems] Fix `gem install <non-existent-gem> --force` crashDavid Rodríguez
Before: ``` $ gem install sfdsfdsfsdide --force ERROR: While executing gem ... (NoMethodError) undefined method `spec' for nil:NilClass @always_install << newest.spec ^^^^^ ``` After: ``` $ gem install sfdsfdsfsdide --force ERROR: Could not find a valid gem 'sfdsfdsfsdide' (>= 0) in any repository ``` https://github.com/rubygems/rubygems/commit/4e2bfd1101
2022-01-06[ruby/reline] windows: test_yamatanooroti fixYO4
windows can't create too narrow and tall window. https://github.com/ruby/reline/commit/20b5f2f6fc
2022-01-05Remove Refinement#{extend_object,append_features,prepend_features}Jeremy Evans
Also make include, prepend, and extend raise a TypeError if one of the modules is a refinement. Implements [Feature #18270] Notes: Merged: https://github.com/ruby/ruby/pull/5358
2022-01-05test/ruby/test_refinement.rb: Remove "assigned but unused variable"Yusuke Endoh
2022-01-05Add Module#refinements and Refinement#refined_class [Feature #12737]Shugo Maeda
2022-01-05Add Module.used_refinementsShugo Maeda
2022-01-05Fix `Leaked file descriptor: TestIO_Console#test_console_kw`Kazuhiro NISHIYAMA
``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ```
2022-01-05[rubygems/rubygems] Fix race conditon on JRubyDavid Rodríguez
On JRuby, sometimes we get the following error in CI when running a realworld test that checks that `gem install rails` succeeds: ``` ERROR: While executing gem ... (NoMethodError) undefined method `ignored=' for nil:NilClass /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/stub_specification.rb:193:in `to_spec' org/jruby/RubyArray.java:2642:in `map' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:758:in `_all' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:956:in `each' org/jruby/RubyEnumerable.java:1710:in `any?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/resolver/activation_request.rb:111:in `installed?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/request_set.rb:173:in `block in install' ``` I'm not sure how this error is happening, but I think there's no need to copy the `@ignored` instance variable when materializing stub specifications. This instance variable is used to not print a warning about missing extensions more than once for each gem upon gem activation, but as far as I can see, it's only used by methods that work on specification stubs. Once specifications are materialized, I think it can be safely ignored. https://github.com/rubygems/rubygems/commit/301cecd5a7
2022-01-04Don't segfault if Warning.warn is undefinedJeremy Evans
Check that there is a method entry for the method before passing it to rb_method_entry_arity. Fixes [Bug #18458] Notes: Merged: https://github.com/ruby/ruby/pull/5391
2022-01-04[Feature #18364] Add GC.stat_heap to get stats for memory heapsPeter Zhu
GC.stat_heap will return stats for memory heaps. This is used for the Variable Width Allocation feature. Notes: Merged: https://github.com/ruby/ruby/pull/5177
2022-01-04[ruby/error_highlight] Add a test to check if it is robust against a spoofed ↵Yusuke Endoh
filename Previously, RubyVM::AST.of opened a wrong file if the iseq's file path is spoofed. ``` module Dummy binding.irb end ``` ``` $ ruby test.rb From: test.rb @ line 2 : 1: module Dummy => 2: binding.irb 3: end irb(Dummy):001:0> foo /home/mame/work/ruby/local/lib/ruby/3.1.0/error_highlight/base.rb:412:in `spot_colon2': undefined method `last_lineno' for nil:NilClass (NoMethodError) if nd_parent.last_lineno == @node.last_lineno ^^^^^^^^^^^^ ``` Found by @kateinoigakukun This issue is already fixed in the interpreter side. This change just adds a test for the case. https://github.com/ruby/error_highlight/commit/f3626b9032
2022-01-04[ruby/error_highlight] Fix the spurious TypeError.Christian Boos
When we have no backtrace locations, we can't have the highlight, so just return the message. https://github.com/ruby/error_highlight/commit/9f5c639494
2022-01-04[ruby/error_highlight] Reproduce the error seen when calling .to_s in ↵Christian Boos
embedded Ruby The test fails with the following error: Error: test_simulate_funcallv_from_embedded_ruby(ErrorHighlightTest): TypeError: wrong argument type nil (expected method) https://github.com/ruby/error_highlight/commit/52943c9cd2
2022-01-04Fix the previous commitYusuke Endoh
2022-01-04test/ruby/test_method.rb: Fix a random failure during `make COVERAGE=1`Yusuke Endoh
This fixes the following failure. ``` 1) Error: TestMethod#test_method_list: NoMethodError: undefined method `<=>' for #<BasicObject:0x00007f7757e7eb60> mods = mods.sort_by {|m| m.name } ^^^^^^^^ ``` https://github.com/ruby/actions/runs/4699487470?check_suite_focus=true TestNoMethodError#test_to_s creates an anonymous module whose `#name` method returns a BasicObject. https://github.com/ruby/ruby/blob/f0669fb6cbdbad499974252ef2d955a608d0adc1/test/ruby/test_nomethod_error.rb#L95-L99 TestMethod#test_method_list uses `ObjectSpace.each_object(Module)` to gather all Modules and attempts to sort them by `#name`. But the anonymous module returns a BasicObject, which leads to the test failure above.
2022-01-04Use omit instead of skip: test/ruby/**/*.rbHiroshi SHIBATA
2022-01-04[ruby/net-http] Handle invalid use of IP addresses in SNIJeremy Evans
Server Name Indication does not allow IP addresses (RFC 6066, section 3: `Literal IPv4 and IPv6 addresses are not permitted in "HostName".`). Recent versions of LibreSSL enforce this restriction, which raises when setting the hostname to an IP address (s.hostname=), before attempting to setup the SSL connection. Since the certificate used in the test is already for localhost, we cannot connect to localhost. However, as all the test does is check for a specific exception, just modify the regexp used so it handles both cases. https://github.com/ruby/net-http/commit/6ab399db45
2022-01-03[ruby/reline] Remove test TODO comments that have been confirmed by E2E testsaycabta
https://github.com/ruby/reline/commit/2ed77b693f
2022-01-02[ruby/reline] Check capname of tigetstr/tigetflag/tigetnumaycabta
Incorrect arguments can cause SEGV. https://github.com/ruby/reline/commit/a58748bcf9
2022-01-02[ruby/reline] Add test_tigetstr_with_erroraycabta
https://github.com/ruby/reline/commit/1ca779740a
2022-01-02[ruby/reline] Implement Reline::Terminfo.tigetnumaycabta
https://github.com/ruby/reline/commit/695212d5d2
2022-01-01[ruby/reline] Consolidate tests that were unnecessarily dividedaycabta
https://github.com/ruby/reline/commit/62eec42e4a
2022-01-01[ruby/reline] Implement Reline::Terminfo.tigetflagaycabta
https://github.com/ruby/reline/commit/0451ed7a28
2022-01-01Remove deprecated Random::DEFAULT [Feature #17351]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5382
2021-12-30Add support for anonymous rest and keyword rest argument forwardingJeremy Evans
This allows for the following syntax: ```ruby def foo(*) bar(*) end def baz(**) quux(**) end ``` This is a natural addition after the introduction of anonymous block forwarding. Anonymous rest and keyword rest arguments were already supported in method parameters, this just allows them to be used as arguments to other methods. The same advantages of anonymous block forwarding apply to rest and keyword rest argument forwarding. This has some minor changes to #parameters output. Now, instead of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`. These were already used for `...` forwarding, so I think it makes it more consistent to include them in other cases. If we want to use `[:rest], [:keyrest]` in both cases, that is also possible. I don't think the previous behavior of `[:rest], [:keyrest]` in the non-... case and `[:rest, :*], [:keyrest, :**]` in the ... case makes sense, but if we did want that behavior, we'll have to make more substantial changes, such as using a different ID in the ... forwarding case. Implements [Feature #18351] Notes: Merged: https://github.com/ruby/ruby/pull/5148
2021-12-30[ruby/win32ole] Undefine allocator of WIN32OLE_VARIABLE to get rid of warningNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/27d0fdc622
2021-12-30[ruby/reline] Omit a test on Ruby 2.6aycabta
Some tokens in Ruby 2.6 have difference information than in 2.7 and later, but 2.6 will soon be out of support. https://github.com/ruby/reline/commit/f3bc698385
2021-12-30[ruby/reline] Use ripper_lex_without_warningaycabta
https://github.com/ruby/reline/commit/b7536dc224
2021-12-30[ruby/reline] Use unix_line_discard when Ctrl-u is enteredima1zumi
The kill-line was called when C-u was entered, so it is now called unix-line-discard. In readline(3): > unix-line-discard (C-u) > Kill backward from point to the beginning of the line. > The killed text is saved on the kill-ring. https://github.com/ruby/reline/commit/27570d195e
2021-12-29[ruby/reline] Use omit instead of skipHiroshi SHIBATA
https://github.com/ruby/reline/commit/a538de421f
2021-12-29Use omit instead of skip: test/ruby/enc/**/*.rbHiroshi SHIBATA
2021-12-29Sync io-console gem.Samuel Williams
2021-12-28Use omit instead of skip: test/-ext-/**/*.rbHiroshi SHIBATA
2021-12-28Use omit instead of skip: test/socket/**/*.rbHiroshi SHIBATA
2021-12-28Removed deprecated Dir.exists? and File.exists?Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5352
2021-12-27Fix test_rubyoptions for MinGW (#5363)Takashi Kokubun
* Fix test_rubyoptions for MinGW follows up a74a2f456ad549025861be80f50cc3f0dd6646dd * Require jit_support * Fix MinGW platform * Handle MinGW UCRT and fix the prefix * Make it more robust Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-12-27[rubygems/rubygems] Don't crash when updating to an unsupported ↵David Rodríguez
`rubygems-update` version https://github.com/rubygems/rubygems/commit/b0badcd00a
2021-12-27Now YJIT can be enabled on mswin64U.Nakamura
2021-12-26Initialize Struct by calling with keyword argumentsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-26Remove Refinement#include and Refinement#prependNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-26Remove tainted and trusted featuresNobuyoshi Nakada
Already these had been announced to be removed in 3.2. Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-26Make RubyVM::AST.of work with code written in `-e` command-line optionYusuke Endoh
[Bug #18434] Notes: Merged: https://github.com/ruby/ruby/pull/5347
2021-12-25Raise proper exception when month argument is not a nameNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/17485#change-89871 Notes: Merged: https://github.com/ruby/ruby/pull/5344
2021-12-25[ruby/openssl] Add tast cases to OpenSSL::BN using ractorYusuke Nakamura
OpenSSL::BN has been make ractor-safed in 9e7cf9e , but there was no test. And to use 'ractor' annotation, update test-unit to v3.4.6 or higher. https://github.com/ruby/openssl/commit/7541a66911
2021-12-25[ruby/reline] Escape newline(s) in dynamic promptaycabta
https://github.com/ruby/reline/commit/9b209ee1ea
2021-12-25[ruby/reline] Escape newline(s) in promptaycabta
https://github.com/ruby/reline/commit/b545459fca
2021-12-25Increase wait timeaycabta
2021-12-25Wait for output results to test correctlyaycabta