summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/date] Add more timezone abbreviationsJeremy Evans2019-11-011-0/+1
| | | | | | | | | | | | | | | | This gets the time zone abbreviations from https://www.timeanddate.com/time/zones/, and adds unambiguous time zones not already present in zonetab.list. See bin/update-abbr for the program used. This regenerates zonetab.h using prereq.mk (requires gperf). Only one test line is added, just to make sure a new time zone abbreviation is picked up. Fixes Ruby Bug 16286 https://github.com/ruby/date/commit/702e8b3033
* [ruby/zlib] Fix setting mtime to zero in GzipWriterAlan Wu2019-10-311-0/+11
| | | | | | | | | | | Before this change, it was not possible to write out zero for the timestamp part of a Gzip file's header, as calling GzipWriter#mtime with zero was ignored. Judging from the docs for `GzipWriter#mtime=`, it should be possible to indicate that no timestamp is available by calling the method with zero. https://github.com/ruby/zlib/commit/310be39cac
* [ruby/stringio] Remove taint supportJeremy Evans2019-10-311-11/+0
| | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/stringio/commit/60ee9ccd95
* [ruby/date] Revert "Simplify #inspect"Jeremy Evans2019-10-311-2/+0
| | | | | | | | This reverts commit af01edd7d8575f544f647dbe8cde5b6ae535d459. Revert requested by Yui Naruse. https://github.com/ruby/date/commit/875d563557
* [ruby/date] introduce Date::Error, raise Date::Error for everyglaszig2019-10-313-27/+39
| | | | | | "invalid <anything>" type of exception https://github.com/ruby/date/commit/3e55c09ba4
* [ruby/zlib] Remove taint supportJeremy Evans2019-10-311-1/+0
| | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/zlib/commit/21711ed0ce
* Also ignore mswin platformHiroshi SHIBATA2019-10-311-1/+1
|
* Ignore test_racc_command with linux platformHiroshi SHIBATA2019-10-311-1/+1
|
* Try to run assert_output_unchanged with racc testsHiroshi SHIBATA2019-10-312-25/+35
|
* Allow only one argument for keyword_init structAlan Wu2019-10-311-0/+1
| | | | | | | | | | | | | | | ``` irb(main):001:0> RUBY_VERSION => "2.6.5" irb(main):002:0> S = Struct.new(:foo, keyword_init: true) => S(keyword_init: true) irb(main):003:0> S.new({foo: 23424}, 234) # I don't think this is intentional => #<struct S foo=23424> irb(main):004:0> ``` Tightening this up should inform users when they are confused about whether a struct is `keyword_init`.
* Regenerate the output results for test fixtures of raccHiroshi SHIBATA2019-10-3029-2556/+2556
|
* Fix tests for CVE-2018-6914Nobuyoshi Nakada2019-10-292-48/+45
| | | | | | | | | Since the current working directory is not involved in `Tempfile` and `Dir.mktmpdir` (except for the last resort), it is incorrect to derive the traversal path from it. Also, since the rubyspec temporary directory is created under the build directory, this is not involved in the target method. Fixed sporadic errors in test-spec.
* test/rubygems/test_gem.rb: early failure when there is /tmp/GemfileYusuke Endoh2019-10-291-0/+4
| | | | | | | | | | | | | | | Some test cases in rubygems assume that /tmp/Gemfile does not exist. If it does, they fail with very difficult-to-understand message: ``` [ 149/2108] TestGemBundlerVersionFinder#test_bundler_version_with_bundle_update_bundler = 0.00 1) Failure: TestGemBundlerVersionFinder#test_bundler_version_with_bundle_update_bundler [/home/mame/work/ruby/test/rubygems/test_gem_bundler_version_finder.rb:38]: Expected Gem::Version.new("2.0.2") to be nil. ``` I spent one hour to debug this issue. To prevent the same accident, this change makes the test suite stop when /tmp/Gemfile explicitly.
* Revert "Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest""Yusuke Endoh2019-10-297-13/+13
| | | | | | This reverts commit ca5812fe4516a10cc687281f9e47e1a08449f1ab. Now tool/lib/minitest provides "omit", so it should work.
* Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest"Yusuke Endoh2019-10-297-13/+13
| | | | | | This reverts commit b4da6fc1c277190bbd10e795ebf3be45772038e8. `make test-all` uses minitest, which led to "undefined method `omit'"
* [ruby/rdoc] Use Dir.glob to convert short path of Dir.tmpdir to long pathaycabta2019-10-291-0/+8
| | | | https://github.com/ruby/rdoc/commit/ba16e44572
* [ruby/rdoc] Support different drive latters in include pathsaycabta2019-10-291-2/+8
| | | | https://github.com/ruby/rdoc/commit/946d2592e2
* [ruby/rdoc] Use omit of test-unit instead of skip of minitestaycabta2019-10-297-13/+13
| | | | https://github.com/ruby/rdoc/commit/1c5bf2ae1d
* Restore `in_kwarg` flag properlyNobuyoshi Nakada2019-10-291-0/+1
|
* fix bug in keyword + protected combination卜部昌平2019-10-281-0/+16
| | | | Test included for the situation formerly was not working.
* Make `(#methodname)` a linkNobuyoshi Nakada2019-10-261-0/+2
|
* Raise on end-exclusive ranges [Feature #14784]Nobuyoshi Nakada2019-10-261-6/+6
| | | | | Raises an error on end-exclusive ranges unless endless, regardless the receiver.
* [ruby/forwardable] Fix NoMethodError on ruby 2.4 or earlierKazuhiro NISHIYAMA2019-10-261-1/+1
| | | | | | | | | https://github.com/ruby/forwardable/runs/242918994#step:5:12 ``` Error: test_obj_single_delegators_send_id(TestForwardable): NoMethodError: private method `attr_reader' called for #<Class:#<Object:0x00005605af501f58>> ``` https://github.com/ruby/forwardable/commit/711bbb2466
* [ruby/forwardable] Make def_{instance,single}_delegators skip :__send__ and ↵Jeremy Evans2019-10-261-0/+24
| | | | | | | | | | | :__id__ Previously, __send__ and __id__ were skipped if provided as strings, but not skipped if provided as symbols. Fixes Ruby Bug 8855. https://github.com/ruby/forwardable/commit/2e61c8c66c
* [ruby/dbm] Remove taint supportJeremy Evans2019-10-261-1/+0
| | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/dbm/commit/1f0ff0bce1
* Fixed range argument condition [Feature #14784]Nobuyoshi Nakada2019-10-251-7/+14
| | | | | Allows a beginless/endless range, and an end-exclusive range unless the receiver is smaller than its end.
* skip tests that do not work on GC.stress卜部昌平2019-10-251-0/+9
| | | | | These tests rely on GC.stat and GC.last_gc_info, which are not stable when GC.stress is true. Skip them for that case.
* Handle case where ruby2_keywords method splats to ruby2_keywords methodJeremy Evans2019-10-241-0/+26
| | | | | | Previously, the keyword hash was duped (which results in a regular hash), but the dup was not marked as a keyword hash, causing the hash not to be marked as keyword hash even though it should be.
* retry tailcall optimization (#2529)wanabe2019-10-251-0/+15
| | | Sorry, f62f90367fc3bce6714e7c34cbd040e14e43fe07 is push miss.
* Duplicate hash when converting keyword hash to keywordsJeremy Evans2019-10-241-0/+8
| | | | | | | This mirrors the behavior when manually splatting a hash. This mirrors the changes made in setup_parameters_complex in 6081ddd6e6f2297862b3c7e898d28a76b8f9240b, so that splatting to a non-iseq method works the same as splatting to an iseq method.
* Fix typo causing Date.new(year, month) to failJeremy Evans2019-10-241-0/+4
| | | | Add a test for this case.
* Define arguments forwarding as `ruby2_keywords` styleNobuyoshi Nakada2019-10-251-4/+14
| | | | | | | | | | | | Get rid of these redundant and useless warnings. ``` $ ruby -e 'def bar(a) a; end; def foo(...) bar(...) end; foo({})' -e:1: warning: The last argument is used as the keyword parameter -e:1: warning: for `foo' defined here -e:1: warning: The keyword argument is passed as the last hash parameter -e:1: warning: for `bar' defined here ```
* Assert no-kwrest caseNobuyoshi Nakada2019-10-251-1/+16
|
* Assert no-block caseNobuyoshi Nakada2019-10-251-2/+11
|
* Set method locationsNobuyoshi Nakada2019-10-251-2/+2
|
* Arguments forwarding is not allowed in lambda [Feature #16253]Nobuyoshi Nakada2019-10-251-0/+2
|
* Revert "[ruby/fiddle] Fix a failing test (#13)"Hiroshi SHIBATA2019-10-241-11/+0
| | | | This reverts commit 5ebb0d50f6560b35bc03deb79341a115c5f782ee.
* Revert "[ruby/fiddle] test: use env Hash"Hiroshi SHIBATA2019-10-241-13/+10
| | | | This reverts commit 4d844cbaed518743776594fa5ae33b86fe176ad1.
* [ruby/webrick] Support literal IPv6 addresses in X-Forwarded-HostJeremy Evans2019-10-241-0/+44
| | | | https://github.com/ruby/webrick/commit/6b6990ec81
* [ruby/webrick] Remove the squishing of whitespace in header valuesJeremy Evans2019-10-241-1/+1
| | | | | | | | | | While the stripping of header values is required by RFC 2616 4.2 and RFC 7230 3.2.4, the squishing is not and can break things, such as when one header contains an HMAC of another header. Fixes Ruby Bug 7021. https://github.com/ruby/webrick/commit/8b96088a86
* [ruby/webrick] after ruby-2.6.0, set Net::HTTP#write_timeoutthekuwayama2019-10-241-1/+1
| | | | https://github.com/ruby/webrick/commit/3b51f6b4d2
* [ruby/fiddle] Remove taint support (#21)Jeremy Evans2019-10-244-37/+1
| | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/fiddle/commit/18d6fb6915
* [ruby/fiddle] Use RbConfig::SIZEOF (#19)Nobuyoshi Nakada2019-10-241-2/+2
| | | | https://github.com/ruby/fiddle/commit/ea06b28db8
* [ruby/fiddle] test: use env HashSutou Kouhei2019-10-241-10/+13
| | | | https://github.com/ruby/fiddle/commit/a01a962342
* [ruby/fiddle] Fix a failing test (#13)Kenta Murata2019-10-241-0/+11
| | | | | | | | | | | | | | | | | | | | | * Fix a failing test This commit fixes the following failure: ``` 1) Failure: Fiddle::TestImport#test_no_message_with_debug [/Users/mrkn/src/github.com/ruby/fiddle/test/fiddle/test_import.rb:152]: 1. [2/2] Assertion for "stderr" | <[]> expected but was | <["Exception `NameError' at /Users/mrkn/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fiddle/import.rb:157 - uninitialized constant Fiddle::Function::STDCALL"]>. ``` * Stop using Bundler.with_clean_env * Clear existing Ruby environment variables on test_no_message_with_debug https://github.com/ruby/fiddle/commit/13133ddec8
* [ruby/date] Simplify #inspectzverok2019-10-241-0/+2
| | | | https://github.com/ruby/date/commit/af01edd7d8
* [ruby/date] Remove taint supportJeremy Evans2019-10-242-31/+1
| | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous versions. https://github.com/ruby/date/commit/519470dc3b
* [ruby/date] Support -Float::INFINITY...date rangesJeremy Evans2019-10-241-0/+13
| | | | | | Fixes Ruby Bug 12961 https://github.com/ruby/date/commit/7f533c2552
* [ruby/date] Check for numeric arguments in constructorsJeremy Evans2019-10-241-0/+50
| | | | | | | | | | | | | | | Previously, the type of these arguments were not checked, leading to NoMethodErrors in some cases, and TypeErrors in other cases, but not showing what field was having the problems. This change makes it so the field with the problem is included in the error message. For the valid_*? methods, this changes them to return false if one of the arguments that should be numeric is not. Fixes Ruby Bug 11935 Fixes Ruby Misc 15298 https://github.com/ruby/date/commit/a2f4b665f8
* [ruby/date] Make julian dates roundtrip through to_time.to_dateJeremy Evans2019-10-241-0/+18
| | | | | | | | | | | | | | | Previously, julian dates would not round trip through to_time.to_date, because Time is always considered gregorian. This converts the Date instance from julian to gregorian before converting to Time, ensuring that an equal date object will be returned if converting that Time back to Date. This does result in julian Date objects showing different day values if converting to Time. Fixes Ruby Bug 8428. https://github.com/ruby/date/commit/d8df64555e