summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-10-26Make `(#methodname)` a linkNobuyoshi Nakada
2019-10-26Raise on end-exclusive ranges [Feature #14784]Nobuyoshi Nakada
Raises an error on end-exclusive ranges unless endless, regardless the receiver. Notes: Merged: https://github.com/ruby/ruby/pull/2613
2019-10-26[ruby/forwardable] Fix NoMethodError on ruby 2.4 or earlierKazuhiro NISHIYAMA
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
2019-10-26[ruby/forwardable] Make def_{instance,single}_delegators skip :__send__ and ↵Jeremy Evans
:__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
2019-10-26[ruby/dbm] Remove taint supportJeremy Evans
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
2019-10-25Fixed range argument condition [Feature #14784]Nobuyoshi Nakada
Allows a beginless/endless range, and an end-exclusive range unless the receiver is smaller than its end. Notes: Merged: https://github.com/ruby/ruby/pull/2611
2019-10-25skip tests that do not work on GC.stress卜部昌平
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.
2019-10-24Handle case where ruby2_keywords method splats to ruby2_keywords methodJeremy Evans
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. Notes: Merged: https://github.com/ruby/ruby/pull/2609
2019-10-25retry tailcall optimization (#2529)wanabe
Sorry, f62f90367fc3bce6714e7c34cbd040e14e43fe07 is push miss.
2019-10-24Duplicate hash when converting keyword hash to keywordsJeremy Evans
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. Notes: Merged: https://github.com/ruby/ruby/pull/2606
2019-10-24Fix typo causing Date.new(year, month) to failJeremy Evans
Add a test for this case. Notes: Merged: https://github.com/ruby/ruby/pull/2605
2019-10-25Define arguments forwarding as `ruby2_keywords` styleNobuyoshi Nakada
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 ```
2019-10-25Assert no-kwrest caseNobuyoshi Nakada
2019-10-25Assert no-block caseNobuyoshi Nakada
2019-10-25Set method locationsNobuyoshi Nakada
2019-10-25Arguments forwarding is not allowed in lambda [Feature #16253]Nobuyoshi Nakada
2019-10-24Revert "[ruby/fiddle] Fix a failing test (#13)"Hiroshi SHIBATA
This reverts commit 5ebb0d50f6560b35bc03deb79341a115c5f782ee. Notes: Merged: https://github.com/ruby/ruby/pull/2603
2019-10-24Revert "[ruby/fiddle] test: use env Hash"Hiroshi SHIBATA
This reverts commit 4d844cbaed518743776594fa5ae33b86fe176ad1. Notes: Merged: https://github.com/ruby/ruby/pull/2603
2019-10-24[ruby/webrick] Support literal IPv6 addresses in X-Forwarded-HostJeremy Evans
https://github.com/ruby/webrick/commit/6b6990ec81
2019-10-24[ruby/webrick] Remove the squishing of whitespace in header valuesJeremy Evans
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
2019-10-24[ruby/webrick] after ruby-2.6.0, set Net::HTTP#write_timeoutthekuwayama
https://github.com/ruby/webrick/commit/3b51f6b4d2
2019-10-24[ruby/fiddle] Remove taint support (#21)Jeremy Evans
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
2019-10-24[ruby/fiddle] Use RbConfig::SIZEOF (#19)Nobuyoshi Nakada
https://github.com/ruby/fiddle/commit/ea06b28db8
2019-10-24[ruby/fiddle] test: use env HashSutou Kouhei
https://github.com/ruby/fiddle/commit/a01a962342
2019-10-24[ruby/fiddle] Fix a failing test (#13)Kenta Murata
* 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
2019-10-24[ruby/date] Simplify #inspectzverok
https://github.com/ruby/date/commit/af01edd7d8
2019-10-24[ruby/date] Remove taint supportJeremy Evans
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
2019-10-24[ruby/date] Support -Float::INFINITY...date rangesJeremy Evans
Fixes Ruby Bug 12961 https://github.com/ruby/date/commit/7f533c2552
2019-10-24[ruby/date] Check for numeric arguments in constructorsJeremy Evans
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
2019-10-24[ruby/date] Make julian dates roundtrip through to_time.to_dateJeremy Evans
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
2019-10-24Revert "Fix Fiber#transfer"Koichi Sasada
This reverts commit fa8ac91e957a076f6df1adaecad7896817138009. Previous behavior is intentional.
2019-10-23Use dedicated assertion methods for warning and syntax errorNobuyoshi Nakada
2019-10-22test/ruby/test_exception typo fixMSP-Greg
2019-10-21Fix Fiber#transferJeremy Evans
Fiber#transfer previously made it impossible to resume the fiber if it was transferred to (no resuming the target of Fiber#transfer). However, the documentation specifies that you cannot resume a fiber that has transferred to another fiber (no resuming the source of Fiber#transfer), unless control is transferred back. Fix the code by setting the transferred flag on the current/source fiber, and unsetting the transferred flag on the target fiber. Fixes [Bug #9664] Fixes [Bug #12555] Notes: Merged: https://github.com/ruby/ruby/pull/2588 Merged-By: jeremyevans <code@jeremyevans.net>
2019-10-22Arguments forwarding [Feature #16253]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2575
2019-10-21bignum.c (estimate_initial_sqrt): prevent integer overflowYusuke Endoh
`Integer.sqrt(0xffff_ffff_ffff_ffff ** 2)` caused assertion failure because of integer overflow. [ruby-core:95453] [Bug #16269]
2019-10-21Pass the called keyword arguments if `keyword_init`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2582
2019-10-21test/optparse/test_did_you_mean.rb - fix suggestion orderMSP-Greg
Notes: Merged: https://github.com/ruby/ruby/pull/2581
2019-10-21DidYouMean can be an empty stub module [Bug #16263]Nobuyoshi Nakada
2019-10-21test_exception - fix with & w/o did_you_meanMSP-Greg
See Ruby issue 16263 Notes: Merged: https://github.com/ruby/ruby/pull/2577
2019-10-20make monitor.so for performance. (#2576)Koichi Sasada
Recent monitor.rb has performance problem because of interrupt handlers. 'Monitor#synchronize' is frequently used primitive so the performance of this method is important. This patch rewrite 'monitor.rb' with 'monitor.so' (C-extension) and make it faster. See [Feature #16255] for details. Monitor class objects are normal object which include MonitorMixin. This patch introduce a Monitor class which is implemented on C and MonitorMixin uses Monitor object as re-entrant (recursive) Mutex. This technique improve performance because we don't need to care atomicity and we don't need accesses to instance variables any more on Monitor class. Notes: Merged-By: ko1 <ko1@atdot.net>
2019-10-18Support DidYouMean by AmbiguousOption tooNobuyoshi Nakada
2019-10-18Default DidYouMean.formatter to PlainFormatterNobuyoshi Nakada
2019-10-18Added no suggestion test caseNobuyoshi Nakada
2019-10-18Use DidYouMean.formatterNobuyoshi Nakada
Instead of building messages separately.
2019-10-18lib/optparse.rb: Show a did_you_mean hint for unknown optionYusuke Endoh
``` require 'optparse' OptionParser.new do |opts| opts.on("-f", "--foo", "foo") {|v| } opts.on("-b", "--bar", "bar") {|v| } opts.on("-c", "--baz", "baz") {|v| } end.parse! ``` ``` $ ruby test.rb --baa Traceback (most recent call last): test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption) Did you mean? baz bar ``` Notes: Merged: https://github.com/ruby/ruby/pull/2561
2019-10-17Look up constant instead of caching in a globalAaron Patterson
The global can go bad if the compactor runs, so we need to look up the constant instead of caching it in a global.
2019-10-17Update test to handle x32 ABI compiled Ruby on LinuxJeremy Evans
Suggestion from Laurence Parry. Fixes [Bug #16030] Notes: Merged: https://github.com/ruby/ruby/pull/2572
2019-10-17Make circular argument reference a SyntaxError instead of a warningJeremy Evans
Fixes [Bug #10314] Notes: Merged: https://github.com/ruby/ruby/pull/2569
2019-10-17Fixed File.extname at a name ending with a dotNobuyoshi Nakada
File.extname now returns a dot string at a name ending with a dot. [Bug #15267] Notes: Merged: https://github.com/ruby/ruby/pull/2565