summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2021-08-22Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IOLars Kanis
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError. This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed. Fixes bug #18077 Notes: Merged: https://github.com/ruby/ruby/pull/4758
2021-08-21Allow tracing of optimized methodsJeremy Evans
This updates the trace instructions to directly dispatch to opt_send_without_block. So this should cause no slowdown in non-trace mode. To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL and RUBY_EVENT_C_RETURN are added as events to the specialized instructions. Fixes [Bug #14870] Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4739 Merged-By: jeremyevans <code@jeremyevans.net>
2021-08-19Fix test failure on spec/ruby/language/pattern_matching_spec.rbKazuki Tsujimoto
https://github.com/ruby/ruby/runs/3369486308
2021-08-19Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto
2021-08-13Update to ruby/spec@330c641Benoit Daloze
2021-08-07Suppress unused-result warningsS.H
* Hide read function warning in string_spec_RSTRING_PTR_read function * The type of `read` may be `ssize_t` Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4703 Merged-By: nobu <nobu@ruby-lang.org>
2021-07-30Tweak rb_str_modify_expand() + read() spec to try to find out why it fails ↵Benoit Daloze
on some platforms * Use a longer string as <= 23 characters it's embedded on CRuby and the value of rb_str_capacity() is implementation-specific.
2021-07-29Make RubyVM::AbstractSyntaxTree.of raise for method/proc created in evalJeremy Evans
This changes Thread::Location::Backtrace#absolute_path to return nil for methods/procs defined in eval. If the realpath of an iseq is nil, that indicates it was defined in eval, in which case you cannot use RubyVM::AbstractSyntaxTree.of. Fixes [Bug #16983] Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/4519
2021-07-29Update to ruby/spec@b65d01fBenoit Daloze
2021-07-29Update to ruby/mspec@9542a88Benoit Daloze
2021-07-27Bump unicode version for Ruby 3.1Hiroshi SHIBATA
2021-07-27[rubygems/rubygems] Remove the warning for not defining a gem server sourceDaniel Niknam
Bundler has deprecated gemfiles without a global source and this feature is now obsolete. `Bundler::Definition#has_rubygems_remotes?` is removed because it's not used anymore. https://github.com/rubygems/rubygems/commit/d29dd2cb7b
2021-07-27[rubygems/rubygems] Refactor Bundler::Dsl#check_rubygems_source_safety to ↵Daniel Niknam
improve readability `check_rubygems_source_safety` is responsible for: 1. if there are multiple global sources - for bundle 3.x raise an error - for bundle 2.x print a warning 2. print a warning if there is no explicit global source The second responsibility was added recently and now the logic could be extracted to improve readability. Conditions are still live in the `check_rubygems_source_safety` method since we don't want to call both functions always and that would help us achieve that. https://github.com/rubygems/rubygems/commit/f3d7e946ee
2021-07-27[rubygems/rubygems] Deprecate Gemfile without an explicit global sourceDaniel Niknam
Raise a warning when parsing a Gemfile and it doesn't have a global source. Gemfiles like this, specially now that rubygems sources are are no longer merged into a single source for security, are very confusing because they generate a different lockfile depending on the gems you have locally installed. This is because bundler always use an implicit global source that defaults to locally installed gems. https://github.com/rubygems/rubygems/commit/b7523ad21c
2021-07-27[rubygems/rubygems] Explicitly define a global source for testsDaniel Niknam
This is in preparation for deprecating source-less gemfiles. https://github.com/rubygems/rubygems/commit/d6493fa3e2
2021-07-27[rubygems/rubygems] Implement Bundler::SourceList#implicit_global_source?Daniel Niknam
This method is created to tell whether any global source exist in the object or not and it will be used by `Bundler:Dsl` to print a warning if no global source has been defined in the Gemfile. https://github.com/rubygems/rubygems/commit/422fec4438
2021-07-27[rubygems/rubygems] Implement Bundler::Source::Rubygems#no_remotes?Daniel Niknam
This method is created to tell whether any remote exist in the object or not and it will be used by `Bundler:SourceList` to tell if a global source has been defined implicitly or not. https://github.com/rubygems/rubygems/commit/47e3ff0e47
2021-07-27[rubygems/rubygems] The `--quiet` should still display warningsDavid Rodríguez
The is the previous intentional behaviour until https://github.com/rubygems/bundler/commit/ca0676cb1c638e0b9747ea8c18f28adf82cc01de. In my opinion, that previous behaviour was better and should be restored, because we want our users to always see warnings and fix them. And the original issue that motivated the change is fixable by other means, namely through `BUNDLE_SILENCE_ROOT_WARNING`, or through `BUNDLE_SILENCE_DEPRECATIONS` in general. Finally, the --quiet option is still documented as "only print errors and warnings". So this PR essentially reverts https://github.com/rubygems/bundler/commit/ca0676cb1c638e0b9747ea8c18f28adf82cc01de for the above reasons. https://github.com/rubygems/rubygems/commit/35f2254dfc
2021-07-27[rubygems/rubygems] Make `--quiet` spec independent on the specific warningDavid Rodríguez
We'll be removing the warning about no gem sources, so this spec will no longer test that warnings are hidden by `--quiet`. Test that in another way so that we don't lose the coverage when we drop the specific warning about no gem server sources. https://github.com/rubygems/rubygems/commit/cce4f86d28
2021-07-27[rubygems/rubygems] Remove `gem install` hint when installing a gem failsDavid Rodríguez
A fresh `gem install` might not reproduce the exact `bundle install` environment that originally caused the error. It also makes it harder for the user to troubleshoot the error since she needs to run a separate command. Instead, show the original error and backtrace directly. https://github.com/rubygems/rubygems/commit/49c2abfec6
2021-07-27[rubygems/rubygems] Fix bundler binstub version selectionDavid Rodríguez
To mimic built-in rubygems behaviour, only thing that should be approximated is the lockfile version. Other alternatives like `BUNDLER_VERSION` should be respected exactly. https://github.com/rubygems/rubygems/commit/dbd667d4bc
2021-07-27[rubygems/rubygems] Remove LoadError message in regards to requiring a ↵Daniel Niknam
relative file Ruby 1.9.2 removed "." from LOAD_PATH for robustness and security reasons. This code was introduced by https://github.com/rubygems/rubygems/commit/56fc830e19a573a5905eba7f4714ad1f21ed1927 commit to helping users understand the issue and had a guard condition to include the message for `RUBY_VERSION >= "1.9"`. However, the guard condition was removed as part of the "Ruby version leftover" cleanup by https://github.com/rubygems/rubygems/commit/8c9cf76e419fbd8ba83144d701b24ca388813b14 Ruby 1.9 development was ended a long time ago and this message is not useful anymore. https://github.com/rubygems/rubygems/commit/a23609b15a
2021-07-27[rubygems/rubygems] Fix interrupt handling in Bundler workersAndrew Haines
The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes #4764. https://github.com/rubygems/rubygems/commit/b9f455d487
2021-07-26rb_iterate is no longer used in ruby/specBenoit Daloze
2021-07-20Remove meaningless IO#close_on_exec= spec [Feature #17745]Nobuyoshi Nakada
2021-07-18Use rb_block_call() instead of the deprecated rb_iterate()Nobuyoshi Nakada
2021-07-17Disable spec of `pattern matching is experimental` since 3.1Kazuhiro NISHIYAMA
2021-07-17Fix a spec failureKazuhiro NISHIYAMA
``` 1) Warning.[]= :experimental emits and suppresses warnings for :experimental FAILED Expected "" =~ /is experimental/ to be truthy but was nil ```
2021-07-17Fix a spec failureKazuhiro NISHIYAMA
``` 1) The -W command line option with :no-experimental suppresses experimental warnings FAILED Expected "" =~ /is experimental/ to be truthy but was nil ```
2021-07-16Add Integer.try_convert [Feature #15211]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4654
2021-07-16[rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle ↵David Rodríguez
install`'s help https://github.com/rubygems/rubygems/commit/b7b7d16aa8
2021-07-16[rubygems/rubygems] fix dangling empty hooksAndre Arko
it turns out that running `bundle plugin uninstall some-plugin` would remove that plugin from the list of hooks, but if the list of hooks for an event was now empty, we would serialize the empty array into yaml as an empty single bullet item. which would then get unserialized as a plugin with the name empty string. which we would then try to load and explode. 😬 https://github.com/rubygems/rubygems/commit/545ebba9a5
2021-07-16[rubygems/rubygems] test loading bad plugins with nil/empty namesAndre Arko
https://github.com/rubygems/rubygems/commit/e64b1f3497
2021-07-16[rubygems/rubygems] remove focusAndre Arko
https://github.com/rubygems/rubygems/commit/584a393812
2021-07-16[rubygems/rubygems] Fix development gem unintentionally removed on an edge caseDavid Rodríguez
When a development dependency was duplicated inside the gemspec and Gemfile with the same requirements, we went from printing a warning to removing the gem altogether. This change makes it not print a warning, but don't remove the gem either. https://github.com/rubygems/rubygems/commit/8bb2488131
2021-07-14Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4648
2021-07-08Fix ruby_version guards in Unicode/Emoji version specsMartin Dürst
Correct version guards in ruby_version in Unicode/Emoji version specs to correctly use exclusive range endings.
2021-07-08Add new Unicode/Emoji version checks to spec/ruby/library/rbconfigMartin Dürst
- Limit Unicode version 12.1.0 to Ruby versions 2.6.3 - 3.0 - Check that Ruby version 3.1 has Unicode version 13.0.0 - Limit Unicode Emoji version 12.1 to Ruby versions 2.7 - 3.0 - Check that Ruby version 3.1 has Unicode Emoji version 13.0
2021-07-07Sync RubyGems and Bundler with upstreamHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4634
2021-07-07Sync latest bundler & rubygems development versionDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/4533
2021-06-29[WIP] add error_squiggle gemYusuke Endoh
``` $ ./local/bin/ruby -e '1.time {}' -e:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError) 1.time {} ^^^^^ Did you mean? times ``` https://bugs.ruby-lang.org/issues/17930 Notes: Merged: https://github.com/ruby/ruby/pull/4586
2021-06-02Update to ruby/spec@c6e9285Benoit Daloze
2021-06-02Update to ruby/spec@a0b7d0dBenoit Daloze
2021-06-02Update to ruby/mspec@0091e8aBenoit Daloze
2021-06-02Skip a `File.atime` test randomly failing on Travis ppc64le.Jun Aruga
See <https://bugs.ruby-lang.org/issues/17926>. Notes: Merged: https://github.com/ruby/ruby/pull/4546
2021-05-29Fix Enumerator::ArithmeticSequence handling of float rangesJeremy Evans
Depending on the float range, there could be an off-by-one error, where the last result that should be in the range was missed. Fix this by checking if the computed value for the expected value outside the range is still inside the range, and if so, increment the step size. Fixes [Bug #16612] Notes: Merged: https://github.com/ruby/ruby/pull/4434
2021-05-27Guard ruby/spec with spec/mspec/tool/wrap_with_guard.rbHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4530
2021-05-17Use a shared spec for YAML.load and YAML.unsafe_loadBenoit Daloze
2021-05-17Prefer respond_to? to defined? in MSpecBenoit Daloze
2021-05-17spec/ruby/library/yaml: Test YAML.unsafe_load instead of YAML.load in 3.1Yusuke Endoh