summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-05-18test/irb/test_raise_no_backtrace_exception.rb: fix test file pathNobuyoshi Nakada
Create a file for test under the temporary directory.
2021-05-18[ruby/fiddle] Do not use a libdir for glibc, it breaks Linux PPC64 (#70)Jeremy Evans
Fixes [Bug #12666] https://github.com/ruby/fiddle/commit/a267a40be7 Notes: Merged: https://github.com/ruby/ruby/pull/4506
2021-05-18[ruby/fiddle] Add support for "const" in typeSutou Kouhei
GitHub: fix #68 Reported by kojix2. Thanks!!! https://github.com/ruby/fiddle/commit/d7322c234a Notes: Merged: https://github.com/ruby/ruby/pull/4506
2021-05-18[ruby/fiddle] closure: add support for const char *Sutou Kouhei
GitHub: fix GH-62 Reported by Cody Krieger. Thanks!!! https://github.com/ruby/fiddle/commit/284b820f2d Notes: Merged: https://github.com/ruby/ruby/pull/4506
2021-05-18[ruby/fiddle] closure: accept symbol as typeSutou Kouhei
https://github.com/ruby/fiddle/commit/dc2da6633e Notes: Merged: https://github.com/ruby/ruby/pull/4506
2021-05-17Revert an accidentally commits at df86a13cc150f573b1078779667a1573747d3dbdHiroshi SHIBATA
2021-05-17Make the test pass with the old libyamlYusuke Endoh
I have no idea what result is right, but it fails with libyaml 0.1.7 (bundled with Ubuntu 18.04) anyway.
2021-05-17assert_equal accepts an expected value as the first argumentYusuke Endoh
2021-05-17lib/rdoc/rdoc.rb: Allow only RDoc::Options in .rdoc_optionsYusuke Endoh
Follow-up of d8fd92f62024d85271a3f1125bc6928409f912e1. Instead of using unsafe_load blindly, RDoc::Options is only supposed to be allowed.
2021-05-17Workaround with fbb4e3f96c10de2240f2d87eac19cf6f62f65fea in rdocHiroshi SHIBATA
2021-05-17Workaround with fbb4e3f96c10de2240f2d87eac19cf6f62f65feaHiroshi SHIBATA
2021-05-17test/ostruct/test_ostruct.rb: Use YAML.unsafe_load instead of YAML.loadYusuke Endoh
Follow-up of fbb4e3f96c10de2240f2d87eac19cf6f62f65fea
2021-05-17[ruby/psych] remove deprecated interfaceAaron Patterson
https://github.com/ruby/psych/commit/0767227051
2021-05-17[ruby/psych] Introduce `Psych.unsafe_load`Aaron Patterson
In future versions of Psych, the `load` method will be mostly the same as the `safe_load` method. In other words, the `load` method won't allow arbitrary object deserialization (which can be used to escalate to an RCE). People that need to load *trusted* documents can use the `unsafe_load` method. This commit introduces the `unsafe_load` method so that people can incrementally upgrade. For example, if they try to upgrade to 4.0.0 and something breaks, they can downgrade, audit callsites, change to `safe_load` or `unsafe_load` as required, and then upgrade to 4.0.0 smoothly. https://github.com/ruby/psych/commit/cb50aa8d3f
2021-05-17[ruby/psych] Removed needless platform detectionHiroshi SHIBATA
https://github.com/ruby/psych/commit/57d704fd63
2021-05-17[ruby/psych] Import test assertions from ruby/rubyHiroshi SHIBATA
https://github.com/ruby/psych/commit/01dda86681
2021-05-17[ruby/psych] Fix symabolize_name with non-string keysJean Boussier
https://github.com/ruby/psych/commit/1c5c29e81f
2021-05-17[ruby/psych] feat: allow scalars and sequences to be styled when dumpedJeremy Ebler
https://github.com/ruby/psych/commit/546154ddb7
2021-05-17[Win32] long path name support [Bug #12551]Gabriel Nagy
Implement long path support on Windows by applying Microsoft's recommended application manifest. To make this work on both Visual C++ and MinGW, include the manifest as a resource when generating the resource files. This way it will be embedded into the executables generated by both compilers. It's important for the manifest resource to have ID 1, otherwise GCC will embed a default manifest. Note that in addition to this, the user needs to have [long paths enabled] either by modifying the registry or by enabling a group policy. [long paths enabled]: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4505 Merged-By: nobu <nobu@ruby-lang.org>
2021-05-14test/objspace/test_objspace.rb: check stderr before stdoutYusuke Endoh
When `require "objspace/trace"` fails, previously the failure says: ``` 1) Failure: TestObjSpace#test_objspace_trace [/tmp/ruby/v3/src/trunk-mjit/test/objspace/test_objspace.rb:621]: <3> expected but was <0>. ``` but this is hard to debug.
2021-05-14test/ruby/test_refinement.rb: prevent "assigned but unused variable"Yusuke Endoh
2021-05-14ext/objspace/lib/objspace/trace.rb: AddedYusuke Endoh
This file, when require'ed, starts tracing the object allocations, and redefines `Kernel#p` to show the allocation site. This commit is experimental; the library name and APIs may change. [Feature #17762]
2021-05-13Also `\U` after control/meta is invalid [Bug #17861]Nobuyoshi Nakada
As well as `\u`, `\U` should be invalid there too. And highlight including `u`/`U` not only the backslash before it.
2021-05-12Avoid improper optimization of case statements mixed integer/rational/complexJeremy Evans
Fixes [Bug #17857] Notes: Merged: https://github.com/ruby/ruby/pull/4496
2021-05-12Fix handling of control/meta escapes in literal regexpsJeremy Evans
Ruby uses a recursive algorithm for handling control/meta escapes in strings (read_escape). However, the equivalent code for regexps (tokadd_escape) in did not use a recursive algorithm. Due to this, Handling of control/meta escapes in regexp did not have the same behavior as in strings, leading to behavior such as the following returning nil: ```ruby /\c\xFF/ =~ "\c\xFF" ``` Switch the code for handling \c, \C and \M in literal regexps to use the same code as for strings (read_escape), to keep behavior consistent between the two. Fixes [Bug #14367] Notes: Merged: https://github.com/ruby/ruby/pull/4495
2021-05-13[rubygems/rubygems] Use `Time.stub :now` to avoid a random failureYusuke Endoh
Essentially this reverts 45464bfcbdf9f9cfb440950bc57a27d237627a17. The commit removed a mock of Time.now, which caused a random failure. http://rubyci.s3.amazonaws.com/ubuntu1804/ruby-master/log/20210512T123004Z.fail.html.gz ``` 1) Failure: TestGemPackageTarWriter#test_add_file_signer [/home/chkbuild/chkbuild/tmp/build/20210512T123004Z/ruby/test/rubygems/test_gem_package_tar_writer.rb:117]: Field mtime of the tar header differs.. <"14046746312\u0000"> expected but was <"14046746311\x00">. ``` Object#stub is defined at f1af59fe02ef2cc58f13e2742e4cc6cf8c2a1a20, so now `Time.stub :now` works. https://github.com/rubygems/rubygems/commit/85f60a9ed0
2021-05-13parse.y: Allow "command" syntax in endless method definitionYusuke Endoh
This change allows `def hello = puts "Hello"` without parentheses. Note that `private def hello = puts "Hello"` does not parse for technical reason. [Feature #17398]
2021-05-12* remove trailing spaces. [ci skip]git
2021-05-12Use another class for the comparison.Koichi Sasada
`memsize_of(Object.new)` can be changed with past ivar creation history for Object instances (another Object instance has 4 or more ivars, next created Object instance has the area for the ivars). So use antoher class for the comparison.
2021-05-12Use assert_raise instead of assert_raisesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12Revert 924ce2c5ba4d1c1dc781a6a06682204d358421bbHiroshi SHIBATA
Because test-unit didn't provide the benchmark test. And This test is fragile with the several environments. Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Added begin-end block for java platformHiroshi SHIBATA
Because pend of test-unit raises exception. https://github.com/rubygems/rubygems/commit/b5e2d0855a Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Replace skip to pendHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/0b145135c7 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] util/rubocop -aHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a10ff97830 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Don't use Minitest::MockHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d3fa893597 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Removed minitest/mock from ↵Hiroshi SHIBATA
test/rubygems/test_gem_remote_fetcher.rb https://github.com/rubygems/rubygems/commit/f1af59fe02 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Removed minitest/mock from test_gem_package_tar_writer.rbHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/45464bfcbd Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] capture_output will return empty string, not nilHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/3fa93f6144 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Fixed variable scope at test_silent_systemHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/bfcdf79657 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Rewrite with capture_outputHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a091004ded Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use capture_output instead of capture_ioHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/c46185abe3 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use assert_raise instead of assert_raisesHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/769e87f011 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use dummy assertion for assert_httpsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/64d843fe17 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use capture_output instead of assert_silentHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/3225aab7f8 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use capture_output instead of capture_io for test-unitHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/ab9c80d4cb Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead ↵Hiroshi SHIBATA
of assert_path_exists and refute_path_exists https://github.com/rubygems/rubygems/commit/a7c93558c3 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Extract assert_output to assert_empty and assert_equal ↵Hiroshi SHIBATA
with capture_output https://github.com/rubygems/rubygems/commit/f6759440a4 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use Regexp with refute_matchHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/51fdbe53bc Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Also use capture_output instead of capture_ioHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/229858ea56 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use capture_output instead of capture_io.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/ad9206d4d0 Notes: Merged: https://github.com/ruby/ruby/pull/4491