Open
Description
class MutantExample
private
# mutant:disable
public def demo
{}.freeze
end
end
RSpec.describe MutantExample do
it 'is a hash' do
expect(described_class.new.demo).to be_a(Hash)
end
end
The above produces an alive mutation (see #1398) but if I change the public
modifier to not be inline, the mutant:disable
does work:
class MutantExample
private
# mutant:disable
def demo
{}.freeze
end
public :demo
end
Note that I care about this beyond just private
, protected
, and public
. I have some macros (like memoize
) where I would prefer to use it in an inline fashion rather than repeating the name of the method below the method in the macro.
Metadata
Assignees
Labels
No labels
Activity