Class: BugGuard

Inherits:
VersionGuard show all
Defined in:
lib/mspec/guards/bug.rb

Instance Attribute Summary

Attributes inherited from SpecGuard

#name, #parameters

Instance Method Summary collapse

Methods inherited from VersionGuard

#ruby_version

Methods inherited from SpecGuard

#===, #add, clear, clear_guards, finish, guards, #implementation?, #os?, #platform?, #record, report, #report_key, #reporting?, ruby_version, ruby_version_override, ruby_version_override=, #standard?, #unregister, #windows?, #wordsize?, #yield?

Constructor Details

#initialize(bug, version) ⇒ BugGuard


4
5
6
7
8
# File 'lib/mspec/guards/bug.rb', line 4

def initialize(bug, version)
  @bug = bug
  @version = SpecVersion.new version, true
  self.parameters = [@bug, @version]
end

Instance Method Details

#match?Boolean


10
11
12
13
# File 'lib/mspec/guards/bug.rb', line 10

def match?
  return false if MSpec.mode? :no_ruby_bug
  standard? && ruby_version <= @version
end