Full Changelog Enhancements:
- Add
RSpec::Support::RubyFeatures.distincts_kw_args_from_positional_hash?(Jean byroot Boussier, #535)
Bug Fixes:
- Fix ripper detection on TruffleRuby. (Brandon Fish, #541)
No changes. Released to support other RSpec releases.
Bug Fixes:
- Use
Mutex#owned?to allowRSpec::Support::ReentrantMutexto work in nested Fibers on Ruby 3.0 and later. (Benoit Daloze, #503, #504) - Support
end-less methods inRSpec::Support::Source::Tokenso that RSpec won't hang when anend-less method raises an error. (Yuji Nakayama, #505)
Bug Fixes:
- Fix issue with
RSpec::Support.define_optimized_require_for_rspecon JRuby 9.1.17.0 (Jon Rowe, #492)
Bug Fixes:
- Fix deprecation expectations to fail correctly when asserting on messages. (Phil Pirozhkov, #453)
No changes. Released to support other RSpec releases.
Bug Fixes:
- Flag ripper as supported on Truffle Ruby. (Brandon Fish, #427)
- Prevent stubbing
File.readfrom breaking source extraction. (Jon Rowe, #431)
Bug Fixes:
- Mark ripper as unsupported on Truffle Ruby. (Brandon Fish, #395)
- Mark ripper as unsupported on JRuby 9.2.0.0. (Brian Hawley, #400)
- Capture
Mutex.newfor ourRSpec::Support:Mutexin order to allow stubbingMutex.new. (Jon Rowe, #411)
Bug Fixes:
- Remove unneeded eval. (Matijs van Zuijlen, #394)
Bug Fixes:
- Remove warning caused by keyword arguments on Ruby 2.7.0. (Jon Rowe, #392)
NO CHANGES
Version 3.9.0 was released to allow other RSpec gems to release 3.9.0.
Bug Fixes:
- Escape \r when outputting strings inside arrays. (Tomita Masahiro, Jon Rowe, #378)
- Ensure that optional hash arguments are recognised correctly vs keyword arguments. (Evgeni Dzhelyov, #366)
Bug Fixes:
- Ensure that an empty hash is recognised as empty keyword arguments when applicable. (Thomas Walpole, #375)
- Ensure that diffing truthy values produce diffs consistently. (Lucas Nestor, #377)
Bug Fixes:
- Ensure that inspecting a
SimpleDelegatorbased object works regardless of visibilty of the__getobj__method. (Jon Rowe, #369)
Bug Fixes:
- Order hash keys before diffing to improve diff accuracy when using mocked calls. (James Crisp, #334)
Bug Fixes:
- Fix source extraction logic so that it does not trigger a
SystemStackErrorwhen processing deeply nested example groups. (Craig Bass, #343)
Enhancements:
- Improve compatibility with
--enable-frozen-string-literaloption on Ruby 2.3+. (Pat Allan, #320) - Add
Support.class_offor extracting class of any object. (Yuji Nakayama, #325)
Bug Fixes:
- Fix recursive const support to not blow up when given buggy classes
that raise odd errors from
#to_str. (Myron Marston, #317)
Enhancements:
- Import
Sourceclasses from rspec-core. (Yuji Nakayama, #315)
No user-facing changes.
Bug Fixes:
- Prevent truncated formatted object output from mangling console codes. (#294, Anson Kelly)
No user facing changes since beta4
Enhancements:
- Improve
MethodSignatureto better support keyword arguments. (#250, Rob Smith).
Bug Fixes:
- Fix
EncodedStringto properly handle the behavior ofString#spliton JRuby when the string contains invalid bytes. (Jon Rowe, #268) - Fix
ObjectFormatterso that formatting objects that don't respond to#inspect(such asBasicObject) does not causeNoMethodError. (Yuji Nakayama, #269) - Fix
ObjectFormatterso that formatting recursive array or hash does not causeSystemStackError. (Yuji Nakayama, #270, #272)
No user-facing changes.
Enhancements:
- Improve formatting of objects by allowing truncation to a pre-configured length. (Liam M, #256)
Bug Fixes:
- Fix
RSpec::Support::RubyFeature.ripper_supported?so it returnsfalseon Rubinius since the Rubinius team has no plans to support it. This prevents rspec-core from trying to load and use ripper to extract failure snippets. (Aaron Stone, #251)
Changes:
- Remove
VersionCheckerin favor ofComparableVersion. (Yuji Nakayama, #266)
Enhancements:
- Improve formatting of
Delegatorbased objects (e.g.SimpleDelgator) in failure messages and diffs. (Andrew Horner, #215) - Add
ComparableVersion. (Yuji Nakayama, #245) - Add
Rippersupport detection. (Yuji Nakayama, #245)
Bug Fixes:
- Work around bug in JRuby that reports that
attr_writermethods have no parameters, causing RSpec's verifying doubles to wrongly fail when mocking or stubbing a writer method on JRuby. (Myron Marston, #225)
Enhancements:
- Improve formatting of arrays and hashes in failure messages so they use our custom formatting of matchers, time objects, etc. (Myron Marston, Nicholas Chmielewski, #205)
- Use improved formatting for diffs as well. (Nicholas Chmielewski, #205)
Bug Fixes:
- Fix
FuzzyMatcherso that it checksexpected == actualrather thanactual == expected, which avoids errors in situations where theactualobject's==is improperly implemented to assume that only objects of the same type will be given. This allows rspec-mocks'anythingto match against objects with buggy==definitions. (Myron Marston, #193)
Bug Fixes:
- Fix an encoding issue with
EncodedString#splitwhen encountering an invalid byte string. (Benjamin Fleischer, #1760)
Bug Fixes:
- Fix
RSpec::CallerFilterto work on Rubinius 2.2. (Myron Marston, #169)
Enhancements:
- Add extra Ruby type detection. (Jon Rowe, #133)
- Make differ instance re-usable. (Alexey Fedorov, #160)
Bug Fixes:
- Do not consider
[]and{}to match when performing fuzzy matching. (Myron Marston, #157)
Bug Fixes:
- Fix method signature to not blow up with a
NoMethodErroron 1.8.7 when verifying against an RSpec matcher. (Myron Marston, #116)
Bug Fixes:
- Fix
RSpec::Support::DirectoryMaker(used byrspec --initandrails generate rspec:install) so that it detects absolute paths on Windows properly. (Scott Archer, #107, #108, #109) (Jon Rowe, #110)
Bug Fixes:
- Fix
FuzzyMatcherso that it does not wrongly match a struct against an array. (Myron Marston, #97) - Prevent infinitely recursing
#flattenmethods from causing the differ to hang. (Jon Rowe, #101)
Bug Fixes:
- Fix
FuzzyMatcherso that it does not silenceArgumentErrorraised from broken implementations of==. (Myron Marston, #94)
Bug Fixes:
- Fix regression in
Support#method_handle_forwhere proxy objects with method delegated would wrongly not return a method handle. (Jon Rowe, #90) - Properly detect Module#prepend support in Ruby 2.1+ (Ben Langfeld, #91)
- Fix
rspec/support/warnings.rbso it can be loaded and used in isolation. (Myron Marston, #93)
- Revert
BlockSignaturechange from 3.0.1 because of a ruby bug that caused it to change the block's behavior (https://bugs.ruby-lang.org/issues/9967). (Myron Marston, rspec-mocks#721)
- Fix
BlockSignatureso that it correctly differentiates between required and optional block args. (Myron Marston, rspec-mocks#714)
Bug Fixes:
- Issue message when :replacement is passed to
RSpec.warn_with. (Jon Rowe)
Initial release.