Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 65e97d1

Browse files
authored
Merge pull request #1402 from rspec/backport-strict-predicate-fix
Backport strict predicate fix
2 parents ea4d8ea + 577d7bc commit 65e97d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Bug Fixes:
55

66
* Support keyword arguments with `and_call_original` on Ruby 3.0.
77
(Bryan Powell, #1385)
8+
* `RSpec::Mocks::Constant#previously_defined?` is now always a boolean.
9+
(Phil Pirozhkov, #1397)
810

911
### 3.10.1 / 2020-12-27
1012
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.0...v3.10.1)

lib/rspec/mocks/mutate_const.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def to_s
6666

6767
# @private
6868
def self.unmutated(name)
69-
previously_defined = recursive_const_defined?(name)
69+
previously_defined = !!recursive_const_defined?(name)
7070
rescue NameError
7171
new(name) do |c|
7272
c.valid_name = false

0 commit comments

Comments
 (0)